Results 1 to 2 of 2

Thread: After forms are submitted
      
   

  1. #1
    jbonfilio is offline Corporal
    Join Date
    Jun 2006
    Location
    Hamilton Twp., NJ
    Posts
    15

    Question After forms are submitted

    Ok, i worked really hard on my forms, and i've finally got them working. However, after a viewer submits a form, i'd like to have something pop up to say "Thank you for your submission...blah,blah,blah." As it is now, Windows puts up a message about sending an email but then it just returns to the form still filled out. So I would like to also have the form automatically reset itself after the thank you message. How can i achieve this? Thanks in advance.

    Jen

  2. #2
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: After forms are submitted

    Well lets say you used a script like this;
    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "feedback@yourdomain.com";
    $mailsubj = "Feedback form";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form:\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    $mailbody = "$key : $val\n";
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    header("Location: thankyoupageyoucreated.html");
    ?>

    On the bottom you can have the user re-directed to another page that
    you create that says what you want. That a page re-direct would like like this;
    header("Location: thankyoupageyoucreated.html");

    And goes at the bottom of the script (shown in blue)

    So create what ever page you want to say-save it and publish it and then add that script matching the page name.

    Andy
    PHP- is a blast!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49