Re[4]: [PHP] Lost session variables still confounding me

From: Date: Thu, 04 Nov 2004 11:12:29 +0000
Subject: Re[4]: [PHP] Lost session variables still confounding me
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-201150@lists.php.net to get a copy of this message
Hello Stuart, Thursday, November 4, 2004, 10:55:42 AM, you wrote: SF> The variable is alive with any of the code including the one I had SF> originally. It seems to do a reset though when it's redirected. SF> $_SESSION['f1a'] = $_POST['ListingName']; This won't have any effect if you don't actually post the form to Page 3, again it's just resetting the session f1a value to null. Try sticking this on Page 2 (ensure you have a session_start() at the top of the page and that you replace the 'var' text below with the correct ones. if (isset($_POST['var'])) { echo 'POST value found, setting the session var now'; $_SESSION['var'] = $_POST['var']; } else { echo 'No POST value found, dumping session contents'; print_r($_SESSION); } Run it - make it error - what does it end up saying? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I am not young enough to know everything." - Oscar Wilde

« previous php.general (#201150) next »