<?php
//put sha1() encrypted password here - example is 'aka'
$password = 'loads of randomness';
session_start();
if (!isset($_SESSION['loggedIn'])) {
$_SESSION['loggedIn'] = false;
}
if (isset($_POST['password'])) {
if (sha1($_POST['password']) == $password) {
$_SESSION['loggedIn'] = true;
} else {
die ('Incorrect password');
}
}
if (!$_SESSION['loggedIn']):
?>
When the user logs in the page is simply refreshing without any content - ideally i’d like a re-direct to anotherpage.php to happen, I’m trying to add in after the session is loggin in.