Re: Redirect then error message to user

From: Date: Fri, 22 Oct 2004 19:02:07 +0000
Subject: Re: Redirect then error message to user
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-200118@lists.php.net to get a copy of this message
On Saturday 23 October 2004 02:38, Stuart Felenstein wrote: > This isn't working: > Page2 (after page1 has been posted): > > else > { > $_SESSION['er'] = 'Please make sure to fill in all 3 > corresponding values .........'; If you want keep changes to any session variables (so that they're available on subsequent pages) you need to: session_write_close() before you redirect. > header("Location: > http://www.xxxxx.com/TestMulti4a.php" ); > exit; > } > > } > > Page1: > Opening after session_start > > $_SESSION['er'] = $_POST['er']; > > Then below in form area: > > print $er; (tried also echo) > > Am I do something wrong ? What are you trying to do here? Is 'Page1' == TestMulti4a.php? Are you trying to display $_SESSION['er'] as set in Page2? If so why are you assigning $_POST['er'] to $_SESSION['er']? All you need to do is echo $_SESSION['er']. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* A witty saying proves nothing. -- Voltaire */

« previous php.general (#200118) next »