you have to add:
session_start()
in your second file.

"Donpro" <[EMAIL PROTECTED]> wrote in message
005001c234df$fe6e7b80$[EMAIL PROTECTED]">news:005001c234df$fe6e7b80$[EMAIL PROTECTED]...
> Hi,
>
> I have a form that calls a PHP script which sets a session variable and
> redirects to anopther URL as such:
>
> session_start();
> $HTTP_SESSION_VARS['userid'] = "someidnumber";
> Header('Location: ' . 'http://www.mydomain.com/welcome.html');
>
> On welcome.html, I have the following code:
>
> <script language="php">
> echo 'userid: ' . $HTTP_SESSION_VARS['userid'] . '<br/>';
> </script>
>
> When I run it in my browser, the value of 'userid' is empty.  Anyone know
> why?
>
>



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

Reply via email to