Re: Validation and session variables

From: Date: Wed, 27 Oct 2004 04:59:18 +0000
Subject: Re: Validation and session variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-200402@lists.php.net to get a copy of this message
Without seeing the code: Try putting session_start() at the VERY beginning. Also try having the action go to the page itself ($PHP_SELF or putting in the path). Is the session variables being set using $SESSION['']? Respectfully, Ligaya Turmelle Stuart Felenstein wrote:
Having some odd behaviour. First , let me mention this is a multi page form using session variables. (This might be important) So I am doing a page by page validation, and have tried putting the code before session_start or after. Either way my session variables are getting lost. Now in order to do my validation on the same page, I have set form action to nothing action="" And upon sucess of happy validation added this code: if ($_SERVER["REQUEST_METHOD"] == "POST") { $url = "success.php"; Header("Location: $url"); } ?> The page progresses correctly but it seems the variables are gone. Sound like it makes sense ? Any suggestions or ideas. Thank you, Stuart


« previous php.general (#200402) next »