Re: [PHP] session var being lost between pages

2001-10-01 Thread Christian Dechery

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 +, 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


_
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] session var being lost between pages

2001-10-01 Thread Jean-Christian Imbeault

Can someone explain this to me? I am not very confused after reading this 
post ...

are you sure you have session_start() on all three pages and you have 
enabled 'track_vars'???

I have done no such thing. The PHP book I have doesn't mention any of this. 
It simply says that using session_start() and session_register() will cause 
the vars to be kept between pages. Are you sure what you are sayign is true?

If so please help me understand because I never saw any methion of what you 
say must be done in any book or on PHP ML etc ...

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]