Re: Reliability of sessions

From: Date: Thu, 04 Apr 2002 22:09:20 +0000
Subject: Re: Reliability of sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-91619@lists.php.net to get a copy of this message
On 4/4/02 4:56 PM this was written: > How do you pass session IDs via strings? Can you describe in few words > please? Well, I know that SID is a defined constant (see session functions in the online PHP manual) but just to be sure, I created my own functions: function sessinfo() { return session_name() . "=" . session_id(); } function sessfield() { echo "<INPUT TYPE=\"HIDDEN\" NAME=\"" . session_name() . "\" VALUE=\"" . session_id() . "\">\n"; } I use 'session_name()' rather than PHPSESSID because some webmasters may change the PHP.ini file's definition for the session name. Then whenever I make a URL link in my site I do <A HREF="filename.php?<? echo sessinfo(); ?>">my link</A> Of course, the sessfield function is for passing the session ID via a form. -- Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/

« previous php.general (#91619) next »