PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
feiticeir0
Forum Newbie
Posts: 8 Joined: Tue Nov 05, 2002 1:33 pm
Location: Castelo Branco, Portugal
Post
by feiticeir0 » Wed Dec 18, 2002 10:56 am
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
AVATAr
Forum Regular
Posts: 524 Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:
Post
by AVATAr » Wed Dec 18, 2002 11:35 am
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"]
hedge
Forum Contributor
Posts: 234 Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada
Post
by hedge » Wed Dec 18, 2002 12:26 pm
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
Takuma
Forum Regular
Posts: 931 Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:
Post
by Takuma » Wed Dec 18, 2002 12:27 pm
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