mrt003003 Posted October 2, 2011 Share Posted October 2, 2011 Hi there i have some delete link and processing code here: <?php planet.php page echo'<a href="http://localhost/swb/cancelship.php?recordID='.$row_Ships['ShipID'].'" class="arialred" style="color: #FF0000">Cancel</a>'; cancelship.php page if ((isset($_GET['recordID'])) && ($_GET['recordID'] != "")) { $deleteSQL = sprintf("DELETE FROM ships WHERE ShipID=%s", GetSQLValueString($_GET['recordID'], "int")); mysql_select_db($database_swb, $swb); $Result1 = mysql_query($deleteSQL, $swb) or die(mysql_error()); $deleteGoTo = "planet.php"; if (isset($_SERVER['QUERY_STRING'])) { $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?"; $deleteGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $deleteGoTo)); }?> The trouble is that the page the delete links on is determined by an ID from a different table. After i delete the record i wish to remain on the original page but parse the PlanetID. At the moment it just loads the original page again but because it doesnt parse the PlanetID so the page doesnt work. Original page that has the delete link has PlanetID key. From that you are given a list of these delete links with their own key ShipID, which is used to delete those records. So how can i parse the PlanetID back???? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/248294-delete-redirect-to-same-page-parsing-id/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.