I'm currently encounter the problem regarding on updating the data in mysql.I'm using this code,but it always clearing the data instead.Here the code:
<?php
$childID = $_GET[childID];
//Connect to database
$query = "UPDATE staff_children SET child_name = '$child_name', child_edu = '$child_edu', child_age = '$child_age' WHERE childID = '$childID'";
$result = mysql_query($query);
echo "<script languange = 'Javascript'>
alert('Your changed had been save');
location.href = 'StaffFamilyView.php';
</SCRIPT>";
?>
I can't figure out whats wrong,can someone help me.
Thank you in advance.
Regard,
Khairi.