Hi there,
I am in the process of doing a login script which has just one user.
I am creating the script to check if the user is logged in to view the page and redirect them to the login page if they are not logged in and I was wondering if i need to do any more validation/verification type checks as I have seen a lot of scripts with a lot more.
This is what I have currently
Do I need anything else?
Thanks...
I am in the process of doing a login script which has just one user.
I am creating the script to check if the user is logged in to view the page and redirect them to the login page if they are not logged in and I was wondering if i need to do any more validation/verification type checks as I have seen a lot of scripts with a lot more.
This is what I have currently
Code:
<?php
session_start();
$logged_in = 0;
if($_SESSION['username'] == "username" && $_SESSION['password'] == "password") {
$logged_in = 1;
}else{
header("Location: index.php");
exit;
}
?>
Do I need anything else?
Thanks...
Last edited: