Re: YA Session Problem

From: Date: Wed, 01 Aug 2001 21:51:02 +0000
Subject: Re: YA Session Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-60779@lists.php.net to get a copy of this message
Page 1: session_name(login); // create session session_start(); // start session session_register("Email"); // register Email session variable session_register("Password"); // register Password session variable Page 2: session_name(login); // target session session_start(); // start target session session_register("Message"); // register new session variable If you do not specify the session name you will create a new session each time, which it sounds like is happening. All the session variables should be there on Page 2 and when you add the Message variable all the others (Email and Password) are still there, you're just adding another variable. I hope that helps.. I didn't understand your question fully... we'll see :) Rick > I'm actually revisiting this after 8 months or more. I have never gotten > sessions to work on my server and here's the problem: > > Page 1: > > Create session register a variable. > SessionID created is say: 555 (for example) > On the drive in /tmp I get a file sess_555 and it contains my variable. > I submit a form to another page with additional variable info. > > Page 2 > Page two creates the session and recalls the first variable, it is > empty. I set the variable which I posted to the page. > If I echo $PHPSESSID to the screen I get 555. > But in /tmp I have another file sess_777 > Contained in sess_777 is my second variable. > > Is this too abstract? Do I need to give code? > > I even do session_name($PHPSESSID); before session_start() and get the same > results. > > 8 months ago, nobody had an answer for me. Does anyone now? > > -- > > Thomas Deliduka > IT Manager > ------------------------- > New Eve Media > The Solution To Your Internet Angst > http://www.neweve.com/ > > > > -- > 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 >

« previous php.general (#60779) next »