View Full Version : Jump back to index.html after sending a email - possible?

01-22-2012, 06:41 PM
Hello there,

I want to make an email form where you type your "email", "subject" and your "message" (of course). Then (when you clicked on submit button) i want a message to appear on the screen which says something like "Thank you for sending a message.You will soon return to starting page". And for the last part i want to them to be sent back to index.html

And then my question is, how do i make that last part work? I have already done the form and message to appear on the screen. But i have no clue how to make the last part. It would be awesome if i could make them stay at the message for 7 secs or something like that and THEN they will return back to index.html. Any suggestions? I would love to hear them and i hope you can help me out!

Regards: Webjoker

01-22-2012, 06:50 PM
This will wait for 5 seconds before redirecting it to a new page..
<?php header("Refresh: 5;url=http://www.yourdestination.com/"); ?>
echo "You will now be redirected to a new page, after 5 seconds.";
Place after you have done all the processing (insert,send or whatever u wish to do)..

01-22-2012, 06:50 PM
You need a meta refresh. Google it.

01-22-2012, 09:54 PM
Ah, thank you Tangoforce. Exactly what i wanted and it works fine!