Re: Redirect then error message to user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux