I want to return to the original page eg. http://www.something.com/admin/manage_banners.php?banner_type_ID=2
ie. retain the "banner_type_ID" in the url after deleting the record.
I have tried the history method with javascript with no joy:
if ((isset($_GET['banner_ID'])) && ($_GET['banner_ID'] != "")) {
$deleteSQL = sprintf("DELETE FROM tbl_banners WHERE banner_ID=%s",
GetSQLValueString($_GET['banner_ID'], "int"));
mysql_select_db($database_dbConn, $dbConn);
$Result1 = mysql_query($deleteSQL, $dbConn) or die(mysql_error());
$deleteGoTo = "javascript:history.go(-2)";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
Any help would be appreciated.