Php cookie, header, Cannot display page error
Hello everyone,
I'm working on a site with a login system. When you login, you have the option to set two cookies ($_COOKIE['username'] && $_COOKIE['password']).
On the main page is this code -
Code:
if(!isset($_SESSION['username'])) {
if(isset($_COOKIE['username'])) {
header('location:http://localhost/fldrstudios/Login/LoginCookie');
}
}
If they're not logged in, but they have the cookie, it redirects them to a page to verify their username and password and log them in (the password is hashed).
For some reason, when I point the header location to any file within fldrstudios/ IE9 says the page cannot be displayed. (it works fine if I point it to something like google)
This is the code used to set the cookies -
Code:
if(isset($_POST['remember'])) {
$user = $_SESSION['username'];
$pass = $_SESSION['password'];
setcookie('username', $user, time()+60*60*24*1000, '/');
setcookie('password', $pass, time()+60*60*24*1000, '/');
}
Can anyone think of a reason why it'd be doing this?