Announcement

Collapse
No announcement yet.

Help with forms

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

  • Help with forms

    Help. Am new to all of this, and struggling. My website is www.villainthesunshine.com
    On the booking page I have a form. If I click on the form submit button, although I can see action.php come up in the bottom left hand corner, nothing happens; no thank you page and no email.

    The booking form is currently set to action.php, post and multipart/form-data.
    The action.php page is set to php in page properties and the html is in Beginning of Body and reads:
    <?PHP
    $mailto = "booking@villainthesunshine.com";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "") {
    $email = $mailto;booking@villainthesunshine.com
    }
    $mailsubj = "Villa Booking";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form :\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>

    Any advice gratefully received!

  • #2
    Re: Help with forms

    1. All your form fields need to be named. Right now they have the default names "Editbox 1" etc.
    2. The action page needs to be edited, there is some code problem. Probably the ?> missing at the end, but maybe not the only problem.
    3. Remove the Onclick Show event you have added to the submit button.

    Then try again
    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


    • #3
      Re: Help with forms

      Hello

      I actually added a contact form today on my site and followed the instructions to the letter. The only problem I had was that I saved my Thankyou page as, thankyou

      The form wouldn't work until I changed the page name to action

      Offcourse I set the extension to php as apposed to html

      For your information
      Phil Cartledge (Aussie Phil)

      Discover A Simple Approach To Online Business That Locks In Your Success.

      Comment


      • #4
        Re: Help with forms

        Fantastic! I made the field name changes, got rid of the OnClick show event on the submit button, and copied in the hmtl from a different form tutorial, and now I get the thank you page. Progress
        Only trouble is, the email is not reaching me. My email address is booking@villainthesunshine.com. When I test this email address it works fine. I assume therefore that this is a problem on the action page? The html script on this page that I pasted in now reads:
        <?PHP
        $email = $HTTP_POST_VARS[email];
        $mailto = "booking@villainthesunshine.com";
        $mailsubj = "Villa Booking Request";
        $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);
        ?>
        </BODY>
        </HTML>

        Comment


        • #5
          Re: Help with forms

          Probably because your Email field should be "email" with lower case "e".
          if you name it "Email" the script dosn't see it. Change this line of the script:
          $email = $HTTP_POST_VARS[Email];
          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


          • #6
            Re: Help with forms

            Sorry, am rather confused. The first reference to email in this line is lower case, as per the script above. I tried changing the second email E to upper case, as per your example, but this hasnt made any difference.

            Comment


            • #7
              Re: Help with forms

              The script and the form MUST have the email field named the same. Since you have named the email field in your form "Email" the script has to be modified as i indicated above, otherwise you need to rename the email field in the form, to be "email".

              The second email field (Confirm Email) does NOT play any role as far as the form submission is concerned.

              Refresh your browser before testing the form again
              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


              • #8
                Re: Help with forms

                Also, as I am testing out the form, if I incorrectly fill in a box and press submit, it is telling me to change the box as in it's original name eg editbox1 rather than the name that I have given it. Any thoughts please?

                Comment


                • #9
                  Re: Help with forms

                  In the validation section, check "Custom error message" and fill in the name that you have given
                  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


                  • #10
                    Re: Help with forms

                    I understand now. Thank you. I have changed the name of the Email field on the form to email. Sadly, still no email arriving...
                    I have checked the Custom Error Message box, and added in some error messages, and these are working fine.

                    Comment


                    • #11
                      Re: Help with forms

                      I am having the same problem. When testing, I click through to my action page ok but I recieve no email. As above, I have followed the tutorial to the letter, and have used action.php, post and multipart etc. Have named my action page action and made sure it is php not html and have added the php script to beginning of body. No email.

                      My php script is as follows:

                      <?PHP
                      $mailto = "alert1st@ihug.co.nz";
                      $email = $HTTP_POST_VARS['email'];
                      if ($email == "") {
                      $email = $mailto;alert@ihug.co.nz
                      }
                      $mailsubj = "Chemical free report";
                      $mailhead = "From: $email\n";
                      reset ($HTTP_POST_VARS);
                      $mailbody = "Values submitted from web site form :\n";
                      while (list ($key, $val) = each ($HTTP_POST_VARS))
                      {
                      if ($key!="submit")
                      {
                      $mailbody .= "$key : $val\n";
                      }
                      }
                      mail($mailto, $mailsubj, $mailbody, $mailhead);
                      ?>


                      My website address is www.nutartnz.com

                      Any advice is welcome

                      Comment


                      • #12
                        Re: Help with forms

                        I wonder too - I have Dreamweaver on my PC which I can't remove as it's being used for other things by other people. But when I go into ftp manager I see that when I connect, my action.php file has the dreamweaver icon attached to it. I think this is interfering and bluvoda doesn't recognize it (which would be natural). No matter how many times I do this it still the action.php still defaults to dreamweaver. What icon should there be (internet explorer?). Any ideas how to fix this?

                        Comment


                        • #13
                          Re: Help with forms

                          Folks, see the next forum thread; I've discovered that my emails are being triggered, they are just not reaching me. Gearing up for another three hours trying to figure out why now...
                          NavalDesign; thanks SO much for your input so far - hugely appreciated!!

                          Comment


                          • #14
                            Re: Help with forms

                            Originally posted by derynmcg View Post
                            I wonder too - I have Dreamweaver on my PC which I can't remove as it's being used for other things by other people. But when I go into ftp manager I see that when I connect, my action.php file has the dreamweaver icon attached to it. I think this is interfering and bluvoda doesn't recognize it (which would be natural). No matter how many times I do this it still the action.php still defaults to dreamweaver. What icon should there be (internet explorer?). Any ideas how to fix this?
                            If you have associated the .php files to Feamweaver, the icon will be that of dreamweaver.

                            PHP files are nor recognized by BV. It only recognizes files with .bvp extension which it creates.
                            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