OriginalSunny Posted April 13, 2006 Share Posted April 13, 2006 The code i have used to pass the purchaseID from one page to another is below. I don't understand why the purchaseID in bold (in rempur_mess.php) is not being output as the purchase is deleted?? [u]remove_purchase.php[/u]session_start(); ......$sql = "DELETE FROM Purchases where purchaseID = '$purchaseID'"; mysql_query($sql);$_SESSION['auth']="yes"; $_SESSION['logname'] = $purchaseID; header("Location: removepur_mess.php"); ...[u]removepur_mess.php[/u]session_start(); .........(connect to the database ...)...echo "<h2 align='center' style='margin-top: .7in'> Your purchase for purchaseID $purchaseID has been removed from the system</h2>\n"; Link to comment https://forums.phpfreaks.com/topic/7340-data-not-passing-from-one-form-to-the-other/ Share on other sites More sharing options...
kenrbnsn Posted April 13, 2006 Share Posted April 13, 2006 You've stored in the $_SESSION array, but you don't use the value from the $_SESSION array in the second script. Try something like this:[code]<?phpsession_start();$purchaseID = $_SESSION[logname'];//// the rest of your code//?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/7340-data-not-passing-from-one-form-to-the-other/#findComment-26711 Share on other sites More sharing options...
OriginalSunny Posted April 13, 2006 Author Share Posted April 13, 2006 Thanks. It worked!!!!!!! Link to comment https://forums.phpfreaks.com/topic/7340-data-not-passing-from-one-form-to-the-other/#findComment-26787 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.