This is my code on page1:
session_start();
if(isset($_SESSION[$login])){
header("Refresh: 5; location:page2.php");
echo "Welcome back!";
}
I thought this was the way to have a redirect on page2 AFTER 5 seconds of pause, in which the user can see the message "Welcome Back". Am I wrong?
The result of my code is a correct identification of the login, with the consequent showing of echo "Welcome Back", but the redirect isn't happening. I remain in page1 forever.
Where is the error?
ps: I made a search of similar threads, but I hadn't be able to solve the problem, so I'm posting here guys, thank you!