This really has nothing to do with your problem but I am just here to suggest it....
at the top of your "images.
php" file, you have an if, else statement.
Code:
if($_SESSION["loggedin"]==true)
{
}
else
{
header("location:login.php?login=fail&return=images.php");
}
when session_loggedin is true, it does nothing, making that if satement pretty much useless....
you should instead ask if it is NOT true, and redirect them if so in one single if like so:
Code:
if(!$_SESSION["loggedin"])
{
header("location:login.php?login=fail&return=images.php");
}
this one is asking if session_loggedin is FALSE, and if so, it will redirect, otherwise...it will move on. not really a big deal, but something you should try to practice.