Posted: Mon Jun 04, 2007 9:19 am Authenication on each page
I need to authenicate username and password on each page so people can not just access them. I only have one admin login in the database. I have an admin login page for username and password to enter. Once that is entered, these two info gets posted on a validation page where is checks against the database. If everything is correct, then I redirect them to another page. If the username and password is incorrect, then I redirect to the admin login page.
What would be the best way to authenicate user at each page?
On each page that you would like to validate include something like below
<?
session_start();
if((isset($_SESSION["name"]))
{echo"You are not signed in!;}
?>
When someone goes directly to that site and the session is not set(that only done at loggin), they will get the message telling them they are not logged in.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum