faqts : Computers : Programming : Languages : PHP : Installation and Setup : Sessions & Cookies

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

24 of 32 people (75%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

Why do I get a PHPSESSID element introduced in the <form> when I want to use session varaibles?

Mar 11th, 2002 04:01
Ever Blue, Narendra Jain,


Below the dashed line is the answer of Narendra Jain about the question 
I asked. Thanx to him, although it didn't serve my purpose. 
I searched other resources and finally found the answer to my own 
question, so I wanted to share it with you guys. here is it. 
In order not to have a hidden field named "PHPSESSID" introduced by php 
session variables, you have to change:
session.use_trans_sid = 0
Originally it equals 1. 
thanx
------------------------------------------------------------------------
PHPSESSID is the PHP variable which is used to 'establish' sessions. In 
short, when you say session_start(), the variable created to store all 
the session variables is called PHPSESSID. So, when you pass data from 
one page to the other, the session variables pass through via the 
PHPSESSID.
It is always adviseable to have various functions called with the 
PHPSESSID being passed between them. That way the session variable 
always 'stay put', otherwise you will lose the data stored in the 
session variables.