Jump to content

How to check if session is already present?


simcoweb

Recommended Posts

I have a registration form that, if registration is successful, starts and sets the session ID. What I want to do is have it check if the session has already been started so that they don't try to register twice in the same session.

if (!$_SESSION['loggedin'] == true)
{
header("Location: login.php");
} else
{
blah blah proceed with registration
}

I'm just not sure on my syntax but that's the jist of what I need.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.