Venkat Adapa's Tech Blog
Friday, July 2, 2010
PHP start session only once to prevent warnings
session_id() returns an empty string if there is no current session, so to test if a session already exists, its better to write this :
if(session_id() == "")
{
session_start();
}
else
{
// Anything you want
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment