CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   Jump back to index.html after sending a email - possible? (http://www.codingforums.com/showthread.php?t=249521)

webjoker 01-22-2012 05:41 PM

Jump back to index.html after sending a email - possible?
 
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

coding_begins 01-22-2012 05: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.";
exit();
?>
Place after you have done all the processing (insert,send or whatever u wish to do)..

tangoforce 01-22-2012 05:50 PM

You need a meta refresh. Google it.

webjoker 01-22-2012 08:54 PM

Ah, thank you Tangoforce. Exactly what i wanted and it works fine!


All times are GMT +1. The time now is 04:49 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.