php session id in the get method

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

Post Reply
nincha
Forum Contributor
Posts: 191
Joined: Fri Mar 28, 2003 12:30 pm
Location: CA, USA

php session id in the get method

Post by nincha »

why does the session id show among the get method variables? Is there a way to disable this?
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

Try adding this...

Code: Select all

ini_set ("session.use_trans_sid","0");
Add it to the beginning of each file or if there is an include that is used in every php file add it to the beginning of the file. Might want to make sure it is executed before any output it sent to the browser.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

session variables can be stored in two ways. one way is, they are stored as special cookies and the other way is they are stored as URL variables. In your case, the session variables are stored as URL variables rather than cookies. Read more here
Post Reply