Posted by John Murtari on 04/19/07 16:04
"pritaeas" <pritaeas@hotmail.com> writes:
>> I use sessions to store some information which I can use in all the pages
> of
>> my website. This works fine in FF(1.5) but in IE (7) I have a new session
> in
>> every page? I checked my code I do a session_start() once at the top of
> the
>> pages.
>> Is there a setting in IE which forces to start a new session?
>>
>> in IE I have enabled cookies for all sites, I disabled all browser addons.
>> What am I missing. Is there anybody out there who knows how to solve this?
>>
>> I looks like this is not a PHP problem but maybe sombody has encountered
> the
>> same problem and has an answer for me.
>>
>> thanks in advance
> You should use
>
> if (! session_id ()) session_start ();
>
> instead of just session_start().
>
Not sure if you really need to check, the documentation for
session_start says it will resume a session if already present. We do
a lot of session stuff in PHP and just use session_start().
Hope this helps.
--
John
___________________________________________________________________
John Murtari Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211) "TheBook.Com" (TM)
http://thebook.com/
[Back to original message]
|