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

From: Date: Thu, 04 Nov 2004 11:51:48 +0000
Subject: Re: Re[4]: [PHP] Lost session variables still confounding me
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201157@lists.php.net to get a copy of this message
--- Richard Davey <rich@launchcode.co.uk> wrote: > 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? > Before the redirect: POST value found, setting the session var now After the redirect: No POST value found, dumping session contentsArray ( [xx_user_xxx] => username [xx_id_xxx] => 47 [xx_level_xxx] => BasicUser [f1a] => [WAVT_TestMulti2] => [f1b] => [f1c] => [f1d] => [f1e] => [f1g] => [inder] => you have selected too many industries ) Stuart

« previous php.general (#201157) next »