Re: session var being lost between pages

From: Date: Tue, 02 Oct 2001 01:41:50 +0000
Subject: Re: session var being lost between pages
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69518@lists.php.net to get a copy of this message
are you sure you have session_start() on all three pages and you have enabled 'track_vars'??? cuz if you don't you'll have to manually pass the session id trought the form... At 07:50 1/10/2001 +0000, Jean-Christian Imbeault wrote:
Ok, newbie I am but ... I seem to be losing my session vars when I load up a different php page. My set-up: 1- main page starts session and logs user in if (isset($PHPSESSID)) session_start($PHPSESSID); else session_start(); $PHPSESSID = session_id();
$SID       = "PHPSESSID=$PHPSESSID";
if(!isset($userid)) { login_form(); exit; } else { session_register("userid", "userpassword"); } Once the user is logged in I have no problem accessin the vars $userid and $userpassword. On the page I even have an <A HREF> link to second php page and the vars are accessible there also. However this other page has a form. When the user submits the form, a third php page is loaded. On this third page the vars no longer have any values. Why is this? How can I access the vars from this third page? Thanks! Jc _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
_____________________________ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br

« previous php.general (#69518) next »