I'm trying to make an index page with a login. Only problem is that I have no idea how to separate a user who has logged in and a visitor.
The user and password gets written in a sessioncookie so I include a loginchecker.php on all pages to see if the person is in the database.
My idea would be to make an if statement around the including, if you're a visitor then don't run the logchecker.php. How do I do this, or rather, can you see any error in my code?
<?php
if (($_SESSION['uid']) != NULL && ($_SESSION['pwd']) != NULL)
{
include 'loginchecker.php';
}
?>
Sorry about my English, it's not my native language really.