Code: Select all
if(!session_id())
{
session_start();
}
print session_id();
Thanks
Moderator: General Moderators
Code: Select all
if(!session_id())
{
session_start();
}
print session_id();
Don't put session_start() in a conditional--it must be there EVERY time. Check documentation.eshban wrote:I have just start a session in my website. But on every page refresh i got a different session id. Here is the code
I am using Xampp server, can anyone tell me that whcih session property i will set in my php.ini file so that my session id will not changed on every page refreshCode: Select all
if(!session_id()) { session_start(); } print session_id();
Thanks