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"; Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
OriginalSunny Posted April 13, 2006 Author Share Posted April 13, 2006 Thanks. It worked!!!!!!! Quote Link to comment 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.