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.
Making a "In-between" confirmation page
Moderator: General Moderators
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL
Something like (semi-pseudocode)
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
Code: Select all
if ( MESSAGE_POSTED )
{
header("Refresh:3; URL=$url_to_post");
echo "your message has been posted";
}But no, there shouldn't be a problem with what you want to do.
- Nathaniel
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL
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?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.
- seodevhead
- Forum Regular
- Posts: 705
- Joined: Sat Oct 08, 2005 8:18 pm
- Location: Windermere, FL