Re: sessions in php4

From: Date: Tue, 02 Oct 2001 10:18:00 +0000
Subject: Re: sessions in php4
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-69564@lists.php.net to get a copy of this message
try this one: header('Location: new-location.php?'.session_name().'='.session_id()); PHP will append the session_id to the URLs defined in url_rewrite.tags. AFAIK, this feature is only for HTML tags. ----- Original Message ----- From: "Alex Shi" <chpshi@netvigator.ca> To: "sagar N Chand" <sagarchand@yahoo.com>; "php" <php-general@lists.php.net> Sent: Tuesday, October 02, 2001 7:20 AM Subject: Re: [PHP] sessions in php4 > I always using session together with header() and never got a > problem. Here's something might be a hint to you: > > <? > session_start(); > $value = 908; > // I always register it before using it > > session_register("value"); > header("location : new location"); > // How did you write the "new location"? I never header() to a > // location outsite of the current site, and I never use > "http://..." > // in the "new location" > > ?> > > Alex > > > ----- Original Message ----- > From: "sagar N Chand" <sagarchand@yahoo.com> > To: "php" <php-general@lists.php.net> > Sent: Monday, October 01, 2001 9:54 PM > Subject: [PHP] sessions in php4 > > > hi all, > > i'm using a php4.0.6 with apache on win2k. when i register a session and > immediately if i redirect to another > page the session seems not to be registered. eg. > <? > session_start(); > $value = 908; > session_register("value"); > header("location : new location"); > ?> > > when i go to the new page i c that the session has not been reigstered. > > but in case if i dont redirect from php rather use a html redirection code > like "click here to redirect" then > it worked. why ? > <? > session_start(); > $value = 908; > session_register("value"); > ?> > <a href="newlocation">click here to redirect</a> (this worked out ) > > any suggestions ? > > /sagar > > > > > -- > 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 (#69564) next »