After a form is completed its submitted to another page to process the form. Once that's done, it forwards back to where visitor was. I want to display a message to the visitor first before moving to the next page, so how can I delay the page forwarding?

Recommended Answers

All 3 Replies

What are you using, did you write the code?

You might want to post it on here so others can help you out further.

Does the form info be sent to you by email? If so there are afew I found for free while searching, have alook and test to see if they have the options you want, if that is what you want.

Hope that makes sence lol

:)

Have you looked at the PHP sleep() function? Plugging a number in causes the program to pause for teh number of seconds you plug in as a value.

sleep(2); causes the program to pause for 2 seconds.

another option is to use a meta-redirect tag, it's not really php but it does the job.

<meta http-equiv="Refresh" content="4;url=http://www.domain.com/link.html">

that code will wait 4 seconds before sending you to http://www.domain.com/link.html

if you use the sleep function, that will just cause the code to wait, but then you will still need to use either a meta-redirect tag (which i used above) or a header tag

header('Location: http://www.domain.com/link.html');

the only problem with a header tag is that no output can be sent to the user (or you will get an error) so the meta tag might be easier in this case

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.