OK, this is my first page after submitting username and password and checking the password is correct.
<?php
session_start();
if ($username ==""){
}else{
if ($numR == 1) {
if ($Passwordcheck == 1){
session_register("username");
}
}else{
session_destroy();
}
?>
This is what i use on each page
<?php
session_start();
session_register("username");
if(!$username){
print "<meta http-equiv=\"refresh\" content=\"0; URL=index.php\">";//this is just so that it goes tho the login page if not logged in.
}
?>
It all works fine, exept it logs in as different people.