Metacafe Header Takeover

Send Emails with a Web Form - PHP Scripting in Dreamweaver!

Tags:
Adobe Dreamweaver E-mail Form Handler Make Page PHP Script Scripting Sen Websites Training Tutorials Web Webpages Work
tutvid
  • Affiliate Submitter:
    tutvid
  • International International
  • Comments: 0
  • Views: 1,419
  • Added: 12-Jan-08

In the following tutorial we will start with a few html files - which are available for download at http://www.tutvid.com/downloads.html - and we will build an Email Handling PHP script that sends info from your web form to your email! It is pretty easy PHP so enjoy learning and Have fun! I am using Dreamweaver CS3, but you can use pretty much any version of Dreamweaver, just follow closely and try not to make mistakes. Please enjoy and don't forget to check out the site
http://www.tutvid.com

  1. Categories: People & Stories
  2. Favorite On: thirteenxxx
Comments on

Send Emails with a Web Form - PHP Scripting in Dreamweaver!

25 Comments | Add Comment
  • can u post it ...

    can u post it please?

    By samamesLOF [Affiliate User] 1214213395 Reply Spam Moderate Up Moderate Down
  • I used my gmail ...

    I used my gmail account. But now I'm using a different method which uses a little more security measures, so it works a little better.

    By famwkah [Affiliate User] 1214170764 Reply Spam Moderate Up Moderate Down
  • because if bots ...

    because if bots abuse your email then they can use up all your bandwidth (potentially costing you a load of money for extra bandwidth, or your site will be 'down' untill next month) and send you loads of spam.

    By samamesLOF [Affiliate User] 1213730681 Reply Spam Moderate Up Moderate Down
  • how would you add a ...

    how would you add a capcha to stop bots abusing your email?

    By samamesLOF [Affiliate User] 1213730453 Reply Spam Moderate Up Moderate Down
  • Speak to your host. ...

    Speak to your host. This usually happens if your host has been 'blacklisted' due to spam mail coming from their IPaddress.

    By samamesLOF [Affiliate User] 1213730370 Reply Spam Moderate Up Moderate Down
  • Thanks famwkah, It ...

    Thanks famwkah, It worked!
    was really stressed out looking at the web for finding something better then this...and did found some cool things...but i am gonna stick with this one...thanks again

    By roshanpatel95 [Affiliate User] 1213716677 Reply Spam Moderate Up Moderate Down
  • Thank you so much ...

    Thank you so much for sharing your wisdom! You have no idea how much you help out with this videos.

    By rafaelmartino30 [Affiliate User] 1213630787 Reply Spam Moderate Up Moderate Down
  • Ok, I found the ...

    Ok, I found the problem. Seek the video to 8:53. There he shows the variables that he is creating such as $emailField, $nameField, etc. However, when creating the body variable of the email, he uses the first parts of the variables he created such as $email instead of $emailField. Basically, he forgot to add "Field" in the variables he used in the body part of the email. After getting it to work, for some reason I get the email in my spam folder, I don't know why.

    By famwkah [Affiliate User] 1213564969 Reply Spam Moderate Up Moderate Down
  • What's so hard ...

    What's so hard about this......xD
    Just follow some tutorials to learn PHP and done.

    By Swordbeta [Affiliate User] 1213363360 Reply Spam Moderate Up Moderate Down
  • Thanx again. For ...

    Thanx again. For all the help.

    By muxi2222 [Affiliate User] 1213349127 Reply Spam Moderate Up Moderate Down
  • Hi having the same ...

    Hi having the same problem as roshanpatel95 get field headings but no content this has been an extremely frustrating process. By now Tutvid shoul have made changes!!

    By dwainerich [Affiliate User] 1213347648 Reply Spam Moderate Up Moderate Down
  • okay..i am getting ...

    okay..i am getting the results...but i dont see anything in the results...like it just says name and address and the rest of the stuff...but nothing about user's info

    can someone please help me now...i can send u the code and the html page if u want me to?

    By roshanpatel95 [Affiliate User] 1213211079 Reply Spam Moderate Up Moderate Down
  • this is what i get ...

    this is what i get

    Email: $email
    Name: $name
    Phone Number: $phone
    Budget: $budget
    Number of Travelers: $travelers
    Comments: $comments
    Newsletter: $newsletter
    EOD; $headers = "From: $email
    "; $headers .= "Content-type: text/html
    "; $success = mail($webMaster, $emailSubject, $body, $headers); /*Results */ $theResults = <<



    can someone please tell me what am i doing wrong

    thanks in advance

    By roshanpatel95 [Affiliate User] 1213202560 Reply Spam Moderate Up Moderate Down
  • hey bardss!!!how ...

    hey bardss!!!how did you make it work..im not receiving any emails in my inbox :( can you please teach me how you made it working?thanks in advance

    By aivern10 [Affiliate User] 1212899212 Reply Spam Moderate Up Moderate Down
  • or you can go to ...

    or you can go to insert and go to form and click form

    By eminemrocks98 [Affiliate User] 1212875270 Reply Spam Moderate Up Moderate Down
  • Hey tutvid thanks ...

    Hey tutvid thanks for the tutorial it was great! thanks to you my web form is now operational! your a real life saver!!!!

    By bardss [Affiliate User] 1212627820 Reply Spam Moderate Up Moderate Down
  • hi there! i did ...

    hi there! i did exactly the same thing but i am not receiving anything on my email....i did another coding in quite a simpler way in which i receive mails but it doesnt show the email of the sender but the email support of my web host...waht could i be doing wrong? can somebody please help me out on this????!!!

    By aivern10 [Affiliate User] 1211942694 Reply Spam Moderate Up Moderate Down
  • a small mistake in ...

    a small mistake in explanation:
    elseif(empty($email)||empty($field2)||empty($field 3)||.....||empty($fieldn))//check to see if any field is empty
    {header("Location: error.php");}//if empty redirect to ERROR PAGE.

    By robinmitra1 [Affiliate User] 1211906735 Reply Spam Moderate Up Moderate Down
  • I am giving here ...

    I am giving here some basic code that you can adapt easily:
    if(!isset($_POST['email'))//checks if email is set
    {header("Location: form.php");}//if not set redirect back to form
    elseif(empty($email)||empty($field2)||empty($field3)||.....||empty($fieldn))//check to see if any field is empty
    {header("Location: error.php");}//if empty redirect back to form
    else{if(ereg("[
    ]",email)){header("Location: form.php");}
    $mail=mail($to,$subject,$body,$headers);
    header("Location: successful.php");}

    By robinmitra1 [Affiliate User] 1211906613 Reply Spam Moderate Up Moderate Down
  • Did u include ...

    Did u include javascript behaviour to check whether user has filled all the form fields? That should work as long as the user doesnt turn off javascript.
    In case the use does disable javascript, then you will need php for server side validation. This is very simple to achieve. The concept is to check if the $_POST['formfield'] are set or not for all fields. If they are set for all the form fields then it means that user has entered all fields. We can then redirect user accordingly by headers.

    By robinmitra1 [Affiliate User] 1211905845 Reply Spam Moderate Up Moderate Down
  • Form validation ...

    Form validation problem. Email still sends even if some fields are empty and after pop-up warning. Will a good soul help us to complete this form?
    1. form validation problem
    2. UNKNOWN SENDER problem.

    This is a great video though and thanks for sharing.

    By pixelpoint [Affiliate User] 1211858064 Reply Spam Moderate Up Moderate Down
  • two more things i ...

    two more things i would like to point out: you dont have to double quote a variable name while echoing it, unless you also want to output some string with it.
    and u didnt cover on how to prevent the script from the mail injection vulnerability.

    By robinmitra1 [Affiliate User] 1211817537 Reply Spam Moderate Up Moderate Down
  • nice tute :) i wish ...

    nice tute :) i wish i had seen this before though cuz i actually had to bang my head trying to learn it all by myself. there are lots of ways to do it in the internet and many are incorrect.but i certainly learnt something new, the "EOD" thing. I didnt use it for my script but it seems pretty neat. I just concatenated the strings instead...

    By robinmitra1 [Affiliate User] 1211817514 Reply Spam Moderate Up Moderate Down
  • That's right! He's ...

    That's right! He's working with variables like $email that have not even been declared previously. The funny thing is... how come this guy tests it and works fine? Is he bullshitting us pretending is working? Well, I'll give him the benefit of the doubt but I'd like someone to explain it to me.

    By meloponeconpapas [Affiliate User] 1211649657 Reply Spam Moderate Up Moderate Down
  • For anyone who is ...

    For anyone who is receiving the email with blank information - there is an error in the code. Inside the EOD section, change 'Email: $email' to 'Email: $emailField'. Same for the other lines. Once Field has been added it works fine, for me anyway. Great tutorial that just needs a note added, as this could cause people lots of problems.

    By fenixtorch [Affiliate User] 1211190448 Reply Spam Moderate Up Moderate Down
25 Comments | Add Comment