PDA

View Full Version : sessions...


Goldfinger
03-03-2002, 09:44 PM
ok i was reading in the php manual about the session_id() function and my question is.. will it automatically grab the session_id that i placed in the url?

?s=<?=$PHPSESSID?>&page=blah

?? or do i need to say..

session_id($s);

TECK
03-04-2002, 02:01 AM
VB use:<a href="$PHP_SELF?s=$session[sessionhash]">link</a>other use:<a href="$PHP_SELF?PHPSESSID=<?php echo session_id() ?>">link</a>regards,
nakkid.

Goldfinger
03-04-2002, 05:14 AM
um.. this isnt for vbulletin .. this is for my own script :).

Goldfinger
03-04-2002, 05:16 AM
and im talking about grabbing the session in other pages.. i think using ..

session_id($s) would work.. but im just trying to make sure..

TECK
03-04-2002, 06:19 AM
the second code line is correct. session_id() returns the session id for the current session. if the id is specified, it will replace the current session id. SID can also be used to retrieve the current name and session id as a string.session_id(SID)note that i didnt use $.

Admin
03-04-2002, 11:24 AM
Originally posted by nakkid
VB use:<a href="$PHP_SELF?s=$session[sessionhash]">link</a>other use:<a href="$PHP_SELF?PHPSESSID=<?php echo session_id() ?>">link</a>regards,
nakkid.
OT: vBulletin doesn't use PHP's built in session handler, which is why it's much different. :)