Thursday, April 20, 2006

Check whether a session is started in PHP


this line will check if a session has started, if not, start it:

session_id() or session_start();

another alternative:

if(!session_id())
{
session_start();
}

No comments: