Announcement

Collapse
No announcement yet.

After forms are submitted

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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!

    Comment

    Working...
    X