I'm having a problem with my php login form, it seems like something is wrong with it, I have a lot of codes to post so I'm gonna start from the simplest one, basically the function Redirect is not redirecting to "login.php" but to "loginphp", this seems quite strange and that could explain why the rest of the code is not working, here's the code
<?php
include 'functions.php';
sec_session_start();
if(login_check($mysqli) == true) {
} else {
redirect(login.php);
}
?>
And here's the redirect function
function redirect($url, $statusCode = 303)
{
header('Location: ' . $url, true, $statusCode);
die();
}
So as I explained before it's redirecting to http://host.com/loginphp instead of http://host.com/login.php . Thanks in advance!
Change it in your code from
redirect(login.php);
to
redirect("login.php");