PDA

View Full Version : sessions...


Goldfinger
03 Mar 2002, 23:44
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
04 Mar 2002, 04:01
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
04 Mar 2002, 07:14
um.. this isnt for vbulletin .. this is for my own script :).

Goldfinger
04 Mar 2002, 07:16
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
04 Mar 2002, 08:19
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 $.

Chen
04 Mar 2002, 13:24
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. :)