The bit of my code that I'm working on is here:
if ($submit) {
if ($id) {
$sql = "UPDATE pages SET sub='$sub'
msg='$msg',name='$name',email='$email',newday='$newday' WHERE id=$id";
} else {
$sql = "INSERT INTO pages (sub,msg,name,email,date,time,newday) VALUES
('$sub','$msg','$name','$email','$date','$time','$newday')";
}
$sql = "SELECT * FROM pages WHERE id=$id";
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
printf("Record updated/edited!<p>Return to <A
href=\"index.php?id=%s\">Index</a>", $myrow["id"]);
}
I want to make it so when I click submit for adding a new entry, The
"Return" link returns to the fresh entry. But it's just comming up with
http://localhost/index.php?id= (no number after the id= I've been trying for
ever and I'm not getting anywhere :-(
Any help would be appreciated
Thank You for your time.
-Ben