<?php include 'database/db.php';
if(isset($_POST['insertdata'])){
$id = $_POST['id'];
$fname = $_POST['fname'];
$mname = $_POST['mname'];
$lname = $_POST['lname'];
$dbirth = $_POST['dbirth'];
$email = $_POST['email'];
$address = $_POST['address'];
$number = $_POST['number'];
$civil = $_POST['civil'];
$gender = $_POST['gender'];
$hobbies = $_POST['hobbies'];
$sql = "UPDATE crud_activity_tb SET fname='$fname', mname='$mname', lname='$lname', dbirth='$dbirth', email='$email', address='$address',
number='$number', civil='$civil', gender='$gender', hobbies='$hobbies' WHERE id = '$id' ";
$query_run = mysqli_query($conn, $sql);
if($query_run){
echo'<script>alert("data update");</script>';
header('Location: index.php');
}
else{
echo '<script>alert("data not save");</script>';
}
}
?>
the data are not changing but there is no error.. please help me