Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2012
    Location
    Sweden
    Posts
    32
    Thanks
    7
    Thanked 0 Times in 0 Posts

    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

  2. #2
    Regular Coder
    Join Date
    Aug 2011
    Posts
    134
    Thanks
    20
    Thanked 0 Times in 0 Posts
    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)..

  3. #3
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,826
    Thanks
    79
    Thanked 575 Times in 562 Posts
    You need a meta refresh. Google it.
    Quote Originally Posted by deathshadow View Post
    So seriously, loosen up that tie, let out the belt, and try relating to normal people on the street instead of the gentleman's club crowd.

  4. Users who have thanked tangoforce for this post:

    webjoker (01-22-2012)

  5. #4
    New Coder
    Join Date
    Jan 2012
    Location
    Sweden
    Posts
    32
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Ah, thank you Tangoforce. Exactly what i wanted and it works fine!


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •