How can I get my session variable to pass to another page?

From: Date: Fri, 26 Jul 2002 20:06:51 +0000
Subject: How can I get my session variable to pass to another page?
Groups: php.general 
Request: Send a blank email to php-general+get-109870@lists.php.net to get a copy of this message
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?

« previous php.general (#109870) next »