Page 1 of 1

Making a "In-between" confirmation page

Posted: Mon Apr 24, 2006 10:00 am
by seodevhead
I have a script that acts much like a message board. When someone posts a message, I would like a quick "confirmation" page to come up, much like a lot of forums do, where it will say something like "Your message has been posted... You are being redirected to your post", and then after a 3 second delay, redirect them to their post.

How is this done? Is there any pitfall to having your script setup this way? Thanks for any help. Take care.

Posted: Mon Apr 24, 2006 10:26 am
by Nathaniel
Something like (semi-pseudocode)

Code: Select all

if ( MESSAGE_POSTED )
{
    header("Refresh:3; URL=$url_to_post");
    echo "your message has been posted";
}
Note that the the Refresh header isn't part of the http specification, and you might want to look into using javascript or the meta refresh tag. Also, I think there is some server (IIS?) that the Refresh header doesn't work on.

But no, there shouldn't be a problem with what you want to do.

- Nathaniel

Posted: Mon Apr 24, 2006 11:29 am
by feyd
Just do a page level redirection with meta tags and a in-page link for the impatient. As Nathaniel said, the header refresh isn't in the specs nor is it supported on some web servers and some browsers as well.

Posted: Mon Apr 24, 2006 11:33 am
by seodevhead
feyd wrote:Just do a page level redirection with meta tags and a in-page link for the impatient. As Nathaniel said, the header refresh isn't in the specs nor is it supported on some web servers and some browsers as well.
Thanks for the help guys... as for the meta refresh.... is there a way to set a 3 sec delay with that? How is that usually done? JS?

Posted: Mon Apr 24, 2006 11:44 am
by feyd

Posted: Mon Apr 24, 2006 11:50 am
by seodevhead
You're the man feyd. Much oblige!