matthew oatham wrote:
Hi,
I have a quick question about PHP session. In my website I have included the command session_start(); at the top of every page. Firstly is this correct?
Yes, this makes sure you don't lose the session somewhere.
Secondly when I visit the website the first link I click on has the php session ID appended to the url however this php session ID is not appended to subsequent links ! Is this correct behaviour? What is going on? Can anyone explain?
When you first visit the site, session_start() sets a cookie that
contains the session id. However, since this is your first visit,
session code has no way of finding out if the cookie was accepted by the
browser. For this reason (session.use_trans_sid is on) all links, forms
etc are rewriten to contain the session id.
Thanks
Matt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php