A
Anonymous
Guest
hello.
I am submitting a form, and then would simply like to refresh the page (or redirect to the same page).
Can somebody tell me what i'm doing wrong?
---------------------------------------------------------------------------------
if($submit){
$sql = "UPDATE runner SET run_id='$run_id',club='$club',first='$first',last='$last',age='$age',sex='$sex',race='$race' WHERE run_id=$run_id";
$result=mysql_query($sql);
echo"Thank you! Information updated.\n";
header("Location:".$_SERVER['PHP_SELF']."");
} elseif ($delete) {
// delete a record
$sql = "DELETE FROM runner WHERE run_id=$run_id";
$result = mysql_query($sql);
echo "$sql Record deleted!<p>";
header("Location:".$_SERVER['PHP_SELF']."");
------------------------------------------------------------------------------------
How would I echo the message "record deleted", wait 5 seconds, and then refresh the page?
-Michael
I am submitting a form, and then would simply like to refresh the page (or redirect to the same page).
Can somebody tell me what i'm doing wrong?
---------------------------------------------------------------------------------
if($submit){
$sql = "UPDATE runner SET run_id='$run_id',club='$club',first='$first',last='$last',age='$age',sex='$sex',race='$race' WHERE run_id=$run_id";
$result=mysql_query($sql);
echo"Thank you! Information updated.\n";
header("Location:".$_SERVER['PHP_SELF']."");
} elseif ($delete) {
// delete a record
$sql = "DELETE FROM runner WHERE run_id=$run_id";
$result = mysql_query($sql);
echo "$sql Record deleted!<p>";
header("Location:".$_SERVER['PHP_SELF']."");
------------------------------------------------------------------------------------
How would I echo the message "record deleted", wait 5 seconds, and then refresh the page?
-Michael