How do I redirect page with PHP after 5 seconds to file register.php? No Javascript or other code, just plain PHP.
Is it possible? How do I do it? I've seen Location: header.
Use header Refresh. It is simple:
header("Refresh:5; url=register.php");
It should work, make sure no output is before this header.
You have a few options:
Refresh Header
header("Refresh:5; url=register.php");
Sleep then Location Header
sleep(5);
header("Location: register.php");
The first option is best, the sleep in the 2nd is blocking and could be used to DDos your service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With