+ Reply to Thread
Results 1 to 14 of 14

Thread: Help with forms
      
   

  1. #1
    hjmotie is offline Staff Sergeant
    Join Date
    Jul 2007
    Posts
    45

    Default 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. #2
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

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


  3. #3
    philipc9635's Avatar
    philipc9635 is offline Lieutenant Colonel
    Join Date
    Jul 2006
    Location
    Perth, Western Australia
    Posts
    737

    Default 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

  4. #4
    hjmotie is offline Staff Sergeant
    Join Date
    Jul 2007
    Posts
    45

    Default 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>

  5. #5
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

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


  6. #6
    hjmotie is offline Staff Sergeant
    Join Date
    Jul 2007
    Posts
    45

    Default 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.

  7. #7
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

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


  8. #8
    hjmotie is offline Staff Sergeant
    Join Date
    Jul 2007
    Posts
    45

    Default 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?

  9. #9
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

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


  10. #10
    hjmotie is offline Staff Sergeant
    Join Date
    Jul 2007
    Posts
    45

    Default 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.

  11. #11
    derynmcg is offline Corporal
    Join Date
    Jul 2007
    Posts
    10

    Default 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

  12. #12
    derynmcg is offline Corporal
    Join Date
    Jul 2007
    Posts
    10

    Default 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?

  13. #13
    hjmotie is offline Staff Sergeant
    Join Date
    Jul 2007
    Posts
    45

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

  14. #14
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,061

    Default Re: Help with forms

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


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