I have a parent/child page on my site. The parent section simply lists the ID and Title of the parent. The child portion includes a form for adding child records to the parent. There are two buttons on the child form: Submit and New.
The Submit button posts the form for insertion or update in the database. The New button clears the form values to allow entering a new record.
The code I use for the New button is as follows:
// Check if the New button has been clicked and if it has,
// redirect to the same page but with only the parent ID. This
// will allow the user to add a new record without leaving the page
if (isset($_POST['New'])) {
header("Location: " . $_SERVER['PHP_SELF'] . "?par_id=" . $_GET['par_id'] ) ;
exit;
}
After clicking the New button, some users (and only some of the time) receive the error message:
Sorry, we couldn't find http://www.anysitename.com/link_manage.php%3Fid. Here are some related websites:
This is a message on DELL computers when it can't resolve the address.
I have a DELL machine myself and have never gotten this message.
My question is, do I need to enclose my redirect with htmlentities? Could this be the issue? I'm confused since the error only appears occasionally.
Thanks.