On the page you start the session,
${session_name()} isn't set. so if you need that on the first page too, you
should do the following

<?php

session_start();
if (!isset(${session_name()})) {
    ${session_name()} = session_id();
}

?>

"Thomas Deliduka" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I use them because 'sid' isn't always populated and, who knows, some browser
may not handle cookies right and then lose a session. I do it to make sure,
to be absolutely sure that it will work.

On 4/4/02 5:19 PM this was written:

> If you made your link like this:  <a href="filename.php?<?=sid?>"> it
tacks
> on the name plus the session id.  If cookies are enabled you will only see
> the session id passed through the url on the first page.. After that you
> wont, thus the little script I wrote so the '?' doesnąt show up.  Now if
> cookies arent enabled you will see the session name and id passed through
> the url every single time.  There is absolutely no reason to use those
> functions since php takes care of that stuff for you.

--

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, visit: http://www.php.net/unsub.php

Reply via email to