Submit form then return to home

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

    • Apr 2006
    • 10

    Submit form then return to home

    I have a form and the php part and my web form is working fine. I sent a test form and it worked great. After hitting submit on my form it sent me to a page saying thanks for your order. Can I put my home page logo to send them back to home without the back button?
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: Submit form then return to home

    Yes you can. But you must modify a little your php script. it must be 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: thankyou_page.html");

    ?>

    Please note that you must change your script because the redirect code added here will be in conflict with the html code in the usual script used by most of BV users.

    thankyou_page.html can be a really thankyou page or any other page in your site. Please make sure that the email field of your form is called "email", not "Email" or "email address" or anything else. Also make sure to use your Vodahost account email in feedback@yourdomain.com
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • stenotome
      Corporal

      • Apr 2006
      • 10

      #3
      Re: Submit form then return to home

      So are you saying that I make up the thank you html page in BV? If so, do I just put words and the home icon and that's it on the thank you page?

      I changed the php file according to your directions. Now awaiting instructions for the thank you page.

      Comment

      • stenotome
        Corporal

        • Apr 2006
        • 10

        #4
        Re: Submit form then return to home

        I just ran a test and this is what came up:

        Warning: Cannot modify header information - headers already sent by (output started at /home/xjlmsjb/public_html/scopist_referral.php:9) in /home/xjlmsjb/public_html/scopist_referral.php on line 21

        Comment

        • stenotome
          Corporal

          • Apr 2006
          • 10

          #5
          Re: Submit form then return to home

          NEVER MIND. I got it.

          Thanks. I just saw that the beginning of the php needed to be removed. So I did that and ran another test and it came out perfect.

          Thank you.

          Comment

          • navaldesign
            General & Forum Moderator

            • Oct 2005
            • 12080

            #6
            Re: Submit form then return to home

            Originally posted by stenotome
            I just ran a test and this is what came up:

            Warning: Cannot modify header information - headers already sent by (output started at /home/xjlmsjb/public_html/scopist_referral.php:9) in /home/xjlmsjb/public_html/scopist_referral.php on line 21
            This probably happened because you have left some html code in the script. Would you mind uploading it here?

            For the thankyou page, yes, it is a simple BV page, and of course you can have your menubar there so they can go on navigating your site.

            But you did get the email, wright?
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment

            Working...
            X