I have the below code to redirect to the same page once the value submitted to the database in php. Before redirect it has to print js alert that the value is submitted. With the below code its just redirecting but not printing the alert. Please tell me where is the problem in the code.
if ($runsql)
{
do_alert ("Profile for ".$student_pet_name." Saved Successfully");
header('Location: student_detail_entry.php');
}
else
{
echo "Error in Submitted Value ". mysql_error();
}
and my do_alert function is
function do_alert($msg)
{
echo '<script type="text/javascript">alert("' . $msg . '"); </script>';
}
thanks...