Hi,
Scenario:
I want to add a new topic to a page that has been passed an 'id' as a URL variable. I click on a link that takes me to a record insertion form (on a new page). I insert my data and hit submit to enter data into my database.
Question:
How do I then return to the page I originally clicked the link on?
(Baring in mind that this page has been passed an 'id' as a URL variable by a link from a previous page)
I have used Dreamweaver MX to create the record insertion form. The code to redirect to a page is as follows:
$insertGoTo = "subcat.php";
if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
I hope I've explained myself ok!
Thankyou in advance....
Scenario:
I want to add a new topic to a page that has been passed an 'id' as a URL variable. I click on a link that takes me to a record insertion form (on a new page). I insert my data and hit submit to enter data into my database.
Question:
How do I then return to the page I originally clicked the link on?
(Baring in mind that this page has been passed an 'id' as a URL variable by a link from a previous page)
I have used Dreamweaver MX to create the record insertion form. The code to redirect to a page is as follows:
$insertGoTo = "subcat.php";
if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
I hope I've explained myself ok!
Thankyou in advance....