Page 1 of 1

Sessions

Posted: Wed Dec 18, 2002 10:56 am
by feiticeir0
HI !

i wonder,
how to pass to another page the session ?

it goes on the URL, so, by the link ?
example:

<a href="page.php" . Session ID ? or something ?

and then, in the other page i got access to session variables ?

regards, Bruno Santos

session

Posted: Wed Dec 18, 2002 11:35 am
by AVATAr
you don“t pass the session you mantain the session with: session_start(); in the top of the page.

You retrive a session var: $HTTP_SESSION_VARS["variable"]

Posted: Wed Dec 18, 2002 12:26 pm
by hedge
If you have enable-trans-sid enabled then php will add it to your url's if it can't set the cookie. You still need to add it to any Header commands.

to add it to the url append the constant SID to your url's

Posted: Wed Dec 18, 2002 12:27 pm
by Takuma

Code: Select all

<a href="something.php?PHPSESSID=<?php $HTTP_SESSION_VARS["variable"] ?>&something=something">
So the format is:-

something.php?something=something1&somewhat=somewhat