Where do you use the command header()?
I have the following code at handlers/handle_login.php. The user has gone to the site from index.php
which is the starting place.
if(!$logged_in){
header("Location: index.php");
die("You are not logged_in");
}
If if-clause is true, I get a 404 error, since the header puts me to to handlers/index.php
, instead of index.php
.