I'm making a login and registration system but my header redirect isn't working properly, Instead of redirecting me to my home.php page on log in it is bringing me to my index.php.
Here is the code:
$_SESSION["user_login"] = $user_login;
header("Location: home.php");
exit();
} else {
echo 'That information is incorrect, try again';
exit();
Why form action is set to index.php but when I change it to home.php it sends me there but does not log me in. Here is the form code:
<form action="index.php" method="POST">
<input type="text" name="user_login" size="25" placeholder="Username" /><br /><br />
<input type="text" name="password_login" size="25" placeholder="Password" /><br /><br />
<input type="submit" name="login" value="Login">
</form>