Also, just an FYI, the "Refresh" header is not supported by all browsers. I believe <meta> redirection is a more reliable choice.
True. But I've tested the "Refresh" header in all my usual browsers (IE, FF, Opera, Safari) and they all support it.
Honestly, if your browser doesn't support basic things like this, you should seriously consider switching browsers!
(Tho I strongly suspect that you, like me, have at least a couple of browser set up :)
I think you meant
-
header('Refresh: 3; url=index.php');
-
print "Welcome back, $userid. You will be redirected in 3 seconds!";
-
That will replace $userid with the value instead of showing $userid itself.
She said she wanted to print $userid :P
But your right. My example would indeed not print the value of $userid.