Redirecting after printing text
Moderator: General Moderators
-
Restrikted
- Forum Newbie
- Posts: 6
- Joined: Sun Jun 01, 2008 10:37 pm
Redirecting after printing text
I've been searching for a while how to do this with no luck. What I want to do is after the person submits a form, the page tells them their submission was successful, and after about 3 seconds redirect them back to to the login page. Obviously I can't use header('Location: login.php'), since I've already output the form and confirmation onto the page. Is there any way to do redirect after printing text?
Re: Redirecting after printing text
You could use a meta refresh*. I'd just give the user a link to click on though in case they read slowly.
* http://en.wikipedia.org/wiki/Meta_refresh
* http://en.wikipedia.org/wiki/Meta_refresh
-
Restrikted
- Forum Newbie
- Posts: 6
- Joined: Sun Jun 01, 2008 10:37 pm
Re: Redirecting after printing text
That worked perfectly. Thanks.
Re: Redirecting after printing text
Or, you can use a Javascript refresh:
Code: Select all
<script type="text/javascript">window.location="NEW URL";</script>