Results 1 to 11 of 11

Thread: Need Help With Contact Form !
      
   

  1. #1
    LSS>CN is offline Private First Class
    Join Date
    Jun 2007
    Posts
    8

    Question Need Help With Contact Form !

    <?PHP
    $mailto ="exampleemail@example.com";
    $email = $HTTP_POST_VARS[email];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Type your mail subject here";
    $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);
    ?>
    Can anyone tell me how to use this script properly to combine my contact page and my thank you together
    Do i use the above script in my thank you page properties or on my contact page ive looked at the tutorials over and over but i just am not geting it i did this with my script
    <?PHP
    $mailto = "pdar332010******.ca";
    $email = "contact";
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Youve Had A Visitor LSS.CN";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "contactlsscn :\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    Is this right or am i way off well those who can help thanx in advance

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

    Default Re: Need Help With Contact Form !

    The instructions clearly say that you should ONLY change the parts in BLUE. You have also changed the third line and it is WRONG.
    Then, you have also missed the closing tag: ?> at the end of the script.

    The script must be pasted in the Inside Body (or Between head, or Start of page, it is not important) of your THANKYOU page. The thank you page MUST be published as php. And, the action of the form, must be the same as as the thankyou page name.
    So, if your thank you page is saved as "thankyou", and this means that it is published as "thankyou.php", the action of the form MUST be "thankyou.php".
    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
    LSS>CN is offline Private First Class
    Join Date
    Jun 2007
    Posts
    8

    Default Re: Need Help With Contact Form !

    Thanks for your reply i expected more from others but thank you again unfortunately it didnt work i did the steps you said but when i hit the submit buton it goes to a blank internet page is there any
    my page is http://www.lifestylesolutions.com.cn/contactlsscn
    http://www.lifestylesolutions.com.cn/thankyou.php
    any other help i would aprecciate thanks again

  4. #4
    LSS>CN is offline Private First Class
    Join Date
    Jun 2007
    Posts
    8

    Question Didnt Work Not Submitting Still

    Thanks for your reply i expected more from others but thank you again unfortunately it didnt work i did the steps you said but when i hit the submit buton it goes to a blank internet page is there any
    my page is http://www.lifestylesolutions.com.cn/contactlsscn
    http://www.lifestylesolutions.com.cn/thankyou.php
    any other help i would aprecciate thanks again

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

    Default Re: Didnt Work Not Submitting Still

    First- in looking at your source code for your form, all the fields are named
    Editbox1, Editbox2, Editbox3 etc........... which is fine except that no field is named "email". Therefore, it does not pluck an email address from which to work with the code provided and thus hangs. So- please name your text box that houses the e-mail address of the sender to - email

    Second- as Naval has stated in the other post, only make changes to the lines in Blue.

    So- make the necessary changes and try again. IF that does not work- please copy exactly the php code you are using and post in this thread. No need to open a new thread.

    Andy
    PHP- is a blast!

  6. #6
    LSS>CN is offline Private First Class
    Join Date
    Jun 2007
    Posts
    8

    Question Re: Need Help With Contact Form !

    ive changed all the values in the contact form as you said and now it looks as though it will work however when i hit submit it says page cannot display my theres no link between my contact page and my thank you page http://www.lifestylesolutions.com.cn/contactlsscn.php
    http://www.lifestylesolutions.com.cn/contactlsscn.php

    <?PHP
    $mailto = "pdar332010******.ca";
    $email = $HTTP_POST_VARS[email];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Youve had a visitor to lsscn";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "contactlsscn" :\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>

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

    Default Re: Need Help With Contact Form !

    The form action is "thankyou" it should have a .php extension.
    example: thankyou.php

    Give that a try and it should work.

    Andy
    PHP- is a blast!

  8. #8
    LSS>CN is offline Private First Class
    Join Date
    Jun 2007
    Posts
    8

    Question Re: Need Help With Contact Form !

    i have added the php extension it still does not work should my thank you the example in the change the values in the blue but in the text area of that example it says email and email subject what should go in the third line ex.<?PHP
    $mailto ="exampleemail@example.com";*
    $email = $HTTP_POST_VARS[email];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Type your mail subject here";*
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form :\n";What goes here ?
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>

    is this what should be in my thank you page and is there any code that applys to mycontact page for some rason my contact submiision goes to cannot be displayed ie page at the top address bar it is
    http://www.lifestylesolutions.com.cn/thankyou.php but its like it doesnt exhist thanks to all in advance willing to help out this rookie

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

    Default Re: Need Help With Contact Form !

    Do not change the third line. The error is that the thankyou.php page is not on the server. Have you published the thankyou.php? Open the thankyou page in the web builder and make sure you have:

    Checked the php extension
    Check the spelling that you named the page- it should be thankyou not- Thankyou or thank_you or Thank You etc.......
    Make sure to publish

    Then try again.

    Andy
    PHP- is a blast!

  10. #10
    LSS>CN is offline Private First Class
    Join Date
    Jun 2007
    Posts
    8

    Smile Re: Need Help With Contact Form !

    Andy yeah thank you sir thats what it was a simple case of lower upper case lol thx man your a life saver !

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

    Default Re: Need Help With Contact Form !

    Your welcome. Have a great week.

    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