Dreamweaver Tutorial - Create a Contact Form In Dreamweaver
In this tutorial you will learn how to create your all important Dreamweaver Contact Form and have the details of the form emailed straight to your INBOX. Capturing Contact Information of potential customers in extremely important in the business world. Don’t let those potential customers or clients disappear just because you didn’t have a Contact Form on your website. By following this Dreamweaver Tutorial you will have a WORKING Contact Form up and running in a few easy steps.
NOTE: Before we start you will need to download this PHP Form to Email Script and unzip it to the root directory of your website. A file named FormToEmail.php will be there.
Now you are ready to begin inserting the form and the fields you would like onto the page. In this example I am going to create anew page, but you can easily add this to an existing page if you already have one in mind for the form to be placed on.
1. In Dreamweaver, choose File > New The New Document Dialog Box appears.
2. In the Blank Document list, choose HTML, then click Create to create a new HTML document.
3. In the Title text field in the Document toolbar, enter Contact Form to add a title to your document.
4. Choose File > Save, then save the document in your local site folder. Name it ContactForm.htm.
5. Next we are going to Insert a Form onto the page, Choose Insert > Form then Form from the Flyout Menu. A Form dialog box will then open. In the Action text box type in FormtoEmail.php (this is the file you extracted to the root of your website earlier). Change the Method to POST and then in the NAME text box type in ContactForm.
6. Next step is to place the form objects onto the page (the information we would like to collect). In this example I have placed a text box for Name and Email Address, and also a Text Area for Comments. To do this click inside your form object and then from the top menu select Insert > Form > Label. From the Code Window click in between the LABEL Tags and type in Name:. Next from the toip menu again select Insert > Form > Text Field. Name the Text field name from the properties box at the bottom.
Repeat those steps and add another Label and Text Field and name it email.
7. Add another Label and type in Comments. Then add a Text Area, go to Inset > Form > Text Area in the top menu. Name the Text Area comments from the Properties box at the bottom and give the Character Width a value of 50 and the Number of Lines a value of 10.
8. Add a Button. Again from the top menu Insert > Form > Button. Your Form should now look like this: (note I have put each element on a different line to help with the usability).
9. Now we need to edit a couple of lines in the FormtoEmail.php file. Open the file in Dreamweaver. The first line you need to edit is the line that starts with $my_email.
Change the email address to the address you want the emails to be sent to. The other line that you may wish to change is this one:
This is where the visitor will be directed after they have pressed the SUBMIT button. If you have a page that you like to direct them to then place the location of the file in there, or simply leave it blank and they will get a thank you message on the same page.
10. Upload both files to your web server and bingo all done. You should know have a working contact form.
In an upcoming Tutorial I am going to show you how to use Dreamweaver and CSS (Cascading Style Sheets) to jazz up your forms with a bit of style!
If you were interested in going the extra mile, in terms of design for your contact form, please download our highly popular tutorial here:
You can follow any responses to this entry through the RSS feed. You can leave a response, or trackback from your own site.



March 7th, 2008 at 5:28 am
Excellent! Thanks for the step-by-step. It looks easy.
March 19th, 2008 at 2:46 am
That’s it? That’s all one needs to create an e-mail form? Here I thought I’d need a DB set up and ready to go. Very cool.
March 19th, 2008 at 11:16 am
One issue I’m having… the e-mails don’t seem to actually send. Everything seems to work right, but no e-mails seem to be going out. I’ve checked and double checked, and everything is input correctly it seems…
March 19th, 2008 at 12:15 pm
Yep, it definitely won’t actually send the e-mail and I’m not sure why. Everything is done as directed… could it be my hosting service, GoDaddy.com’s issue?
March 21st, 2008 at 5:25 pm
Hey thanks This was easy and it helped me learn dreamweaver more.
March 21st, 2008 at 10:46 pm
@Bildo
Just check with your Host and see whether you are able to relay through their mail servers. It sounds like that may be the issue
Cheers
Daniel
March 28th, 2008 at 7:58 am
I’m practicing and learning dreamweaver and this tutorial was excelent, very simple and really works!
April 3rd, 2008 at 2:10 am
Great and simple. Although the continue link doesn’t take me to the page i intend. it goes straight to the php page and then I have to click the coninue button. Any way of just linking straight to the intended page?
also the thing doesn’t work in Safari?!
April 4th, 2008 at 7:50 pm
Great Stuff. What I have always been looking for. Thanks
April 4th, 2008 at 9:50 pm
I have followed the instructions but it didnt work. As ssoon as I press the submit button it isays page cannot be found.
Thanks,
ilker
April 5th, 2008 at 5:39 am
just followed the tutorial and got the same results as ilker “file not found” and no email was recieved. i’m also hosted on godaddy, didn’t see any response to that question.
April 5th, 2008 at 8:08 am
@Iker and @lee
Make sure you check that the file is in the correct location and that the Form Action value is exactly the same as the file name (case sensitive).
Cheers
Daniel
April 6th, 2008 at 6:31 am
to those using godaddy… they suck. get a new host. i’ve had so many problems with clients that use them. they don’t allow you to use any 3rd party scripts for emails or anything. supposedly it’s to be more “secure”. but it’s just annoying.
April 6th, 2008 at 8:22 am
@timmy
I have heard bad things about GoDaddy as well. I use BlueHost and Highly recomment them
Check them out here if you want to change.
Cheers
Daniel
April 7th, 2008 at 7:46 am
I’m making a website, it’s not online yet so i’m working on it in on my local server…
When I did this tutorial and pushed send, to try it out, I got the question if I wanted to download the “FormToEmail.php” file…
Am I’m doing anything wrong or is it just me?
April 7th, 2008 at 10:26 pm
it doesn’t work for me (i followed the tutorial and got the same results as ilker “file not found” and no email was recieved.)
April 8th, 2008 at 5:45 am
I am using GoDaddy and Having problems with them as well
April 8th, 2008 at 12:20 pm
G’day Everyone
Thanks for all your comments. It seems a lot of people are having issues with GoDaddy. From what I can gather they do not allow you to run 3rd Party Scripts. If that is the case then this will not work.
If anyone has recommendations for these people on Hosts that they use then please share your thoughts. As I have said in an earlier comment I use BlueHost and find them really good.
On another note a few people have emailed me with problems like “File Not Found Error”. Just make sure that you double check the file location and also the name of the file. It is case sensitive so that is causing the issue for some.
Cheers
Daniel
April 11th, 2008 at 4:31 am
Dear Daniel,
Its looks cool i done all but not yet uploaded.Will be posting result after upload.
You are simple great
April 11th, 2008 at 9:28 pm
Hey just to let you all know, for Godaddy you just change the FormTomail.php to gdform.asp
Thanks for your help in setting up the forms though!
April 17th, 2008 at 6:10 pm
Great Stuff. What I have always been looking for. Thanks
April 18th, 2008 at 12:56 pm
Dude it works. I had to capitalize the ‘T’ in FormToEmail but that was a quick fix and you rock.
Stay coo.
April 20th, 2008 at 11:08 am
Hi Daniel,
Thanks so much for the script. I am a total Dreamweaver newbie and this was so much less confusing than the other tutorials I’ve found. I did however have the same problem as the others with the message saying “URL not found” (or whatever!) after I clicked the Submit button. I’ve found a weird glitch with Dreamweaver and wanted to pass it on. Whenever you have the option of either typing in a file name or navigating and choosing the file…DEFINITELY go with navigating and clicking. I’ve found no matter how exact you’ve typed something Dreamweaver somehow doesnt recognize it. When I type in FormtoEmail.php….it doesnt recognize it and I got that URL not found message. When I navigate to it BINGO! It likes it then and the form works great. For whatever its worth to everyone out there, give it a try. It worked for me! Have Fun!
April 22nd, 2008 at 11:46 pm
I really hope you can help me. I have spent days trying to set up a Reply Form on my website using “Matt’s Script Archive” etc and when I came across your website I thought yipee! I have copied the file FormtoEmail.php into my root website directory (its there twice actually as FormToEmail.php too) and the file which contains the actual form - programmed as follows (to match your instructions). I get a 405 Error which is a “website programming error”. Please help.
Name:
Company:
Email:
April 22nd, 2008 at 11:57 pm
Sorry… the text in Dreamweaver looks like this.
Name:
Company:
Email:
April 25th, 2008 at 6:23 am
[...] the contact and links page, i used a step by step guide at http://dreamweaverspot.com/adobe-dreamweaver-tutorial-contact-forms/ which helped me insert a contact form on my [...]
April 26th, 2008 at 5:04 am
This tutorial was very helpful. It was short, sweet, and to the point. It was easy to understand, so for beginners like me, you should definitely give it a try.
I think, however, that it should be a little more attractive with more images, but the content was excellent.
April 26th, 2008 at 5:07 am
Short, sweet, and to the point. Most importantly, very helpful. Should be more attractive, in terms of images and colors, but the content really worked/helped.
April 28th, 2008 at 10:20 am
Awesome work !!!!
April 29th, 2008 at 3:37 pm
Great tut, everything is working great. One question though. Is there a way to make the thank you message a popup?
April 29th, 2008 at 7:08 pm
Hi,
Great tutorial, still trying to get it to work, My question.
Does this work whilst using WAMPSERVER on my local computer?
Many thanks and keep it up!
John
April 29th, 2008 at 11:29 pm
@John
I am not to familiar with WAMPSERVER from what I can gather it is Apache, PHP, MySQL on Windows right?
For this to work you need to have an SMTP Server to be able to send the mail.
Cheers
May 2nd, 2008 at 11:48 am
Hi Daniel,
Thanks so much for the script, but I have a problem to run the Contact Form. It was running 2 days and it stop working. I contacted the web.com and they told me if the PHP script is over 4.3.2 than you will have to upgrade the plan. So, my question is what is the code of the PHP?
Thanks again
Fred
May 2nd, 2008 at 9:09 pm
For others, the reason you are getting not found errors is that in the TUT it doesn’t capitalize the ‘T’. Check your case.
My issues is that once I hit submit on the site, it says that YOU CANNOT SUBMIT AN EMPTY FORM
ANy idea why this is?
May 2nd, 2008 at 9:30 pm
NM I had a bad field in my form within dreamweaver, this solved it. I get the form to email perfectly, just two questions.
With the submit button, how can I stop the emails from saying Submit = Submit at the bottom.
Also how to I change the From field. Currently it’s popping up as Whatever@fairfax.dreamhost.com (yes I use dreamhost)
Is there a way to adjust that? Or is it server side?
May 3rd, 2008 at 7:52 am
I am having what looks to be the same issue where everything works great but I don’t get the emails. Where in the code does the mail server info go? I use Gmail, will this work?
May 3rd, 2008 at 8:41 am
For those that have been trying to upload the PHP file on GoDaddy, GoDaddy has its own PHP file for contact forms that works very well. See their help section.
May 5th, 2008 at 5:13 am
Thank you so much. It was very easy and helpful…
May 6th, 2008 at 12:09 pm
hi i test it & it work very well but
i make a test to send to one of my emails but it go to the spam
what can i do to have it normaly in mybox
thanks
May 7th, 2008 at 7:08 am
[...] tutorial is from Dreamweaver Spot that give you info about how to create a PHP contact form for your [...]
May 7th, 2008 at 12:23 pm
@sherif
This could be to do with many things, spam filter levels on your mailserver, the content that is being typed into the fields etc.
Some things to check anyway, Who is hosting your mail?
May 8th, 2008 at 5:46 pm
I fallowed the tutorial but the e-mails are not being sent to my inbox. Everything else is working properly. I use Yahoo as a host. Is there anything else I need to do?
Thanks
May 9th, 2008 at 8:40 am
You are my hero! It totally worked! Thank you!
May 11th, 2008 at 10:21 pm
Have set it up and works as it should, HOWEVER: when i receive emails from the form, it shows up as having no sender, and as a result it goes straight to spam filter. My spam filter will not allow me to add it to safe senders list, because of this reason (no sender info). Can i adjust the script so that there is a sender field in the email??
thanks
May 13th, 2008 at 9:18 pm
I get a message after clicking the submit button which reads: Method not allowed - The requested method POST is not allowed for the URL/FormToEmail.php. Any ideas?
May 13th, 2008 at 11:40 pm
@Casa
This usually means that the server does not support PHP, contact their Tech Support and find out.
Cheers
Daniel
May 14th, 2008 at 12:27 am
I finally got the form to work, but after saying that it has been sent i dont receive anything
May 18th, 2008 at 2:53 am
Brilliant tutorial, thank you! After I got out of trying to think ahead and followed your instructions it’s integrated and working great! I’ve even managed to make it work with graphical fields and several other functions. Very impressed. Thanks for your help!
May 20th, 2008 at 5:57 am
Hi,
I followed this tutorial for a form on my mates site, however whenever i go to send the message and click the submit button, it trys to download the “FormToEmail.php” file?
My form action is exactly as yours, and my php file is as exaclty as yours is.
any help?
Thanks
Justin
May 25th, 2008 at 6:28 pm
When I hit submit it tries to download the FormToMail.php
my site is hosted on mac.com
May 28th, 2008 at 9:11 pm
goodday:
i am so glad that you had given a well detailed tutorial but unfortunately some of its part are malfunctioning such as handling of errors..its enable to send message even the forms are blank. try to visit my trial site:http://www.jrmsc-tc.com/comments.html
please help me with this..
your email is much appriciated
vanny12_34@yahoo.com.ph
May 31st, 2008 at 1:56 am
Thanks for the definition of a great tut. However, when I hit the submit button it gives me the following view:
64 || empty($exploded_email[1])){$errors[] = “Email address is invalid”;}else{if(substr_count($exploded_email[1],”.”) == 0){$errors[] = “Email address is invalid”;}else{$exploded_domain = explode(”.”,$exploded_email[1]);if(in_array(”",$exploded_domain)){$errors[] = “Email address is invalid”;}else{foreach($exploded_domain as $value){if(strlen($value) > 63 || !preg_match(’/^[a-z0-9-]+$/i’,$value)){$errors[] = “Email address is invalid”; break;}}}}}} } // Check referrer is from same site. if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = “You must enable referrer logging to use the form”;} // Check for a blank form. function recursive_array_check_blank($element_value) { global $set; if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}} else { foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);} } } recursive_array_check_blank($_REQUEST); if(!$set){$errors[] = “You cannot send a blank form”;} unset($set); // Display any errors and exit if errors exist. if(count($errors)){foreach($errors as $value){print “$value
“;} exit;} if(!defined(”PHP_EOL”)){define(”PHP_EOL”, strtoupper(substr(PHP_OS,0,3) == “WIN”) ? “\r\n” : “\n”);} // Build message. function build_message($request_input){if(!isset($message_output)){$message_output =”";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace(”_”,” “,ucfirst($key)).”: “.build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).”, “;}}}}return rtrim($message_output,”, “);} $message = build_message($_REQUEST); $message = $message . PHP_EOL.PHP_EOL.”– “.PHP_EOL.”"; $message = stripslashes($message); $subject = “FormToEmail Comments”; $headers = “From: ” . $_REQUEST['email']; mail($my_email,$subject,$message,$headers); ?>
Thank you
Your message has been sent
Click here to continue
HELP!!!
May 31st, 2008 at 3:06 am
this form to email thing is a damn nightmare…
June 2nd, 2008 at 12:55 pm
hi
June 2nd, 2008 at 1:03 pm
goodday:
i am so glad that you had given a well detailed tutorial but unfortunately some of its part are malfunctioning such as handling of errors..its enable to send message even the forms are blank. try to visit my trial site:http://www.jrmsc-tc.com/comments.html
please help me with this..
your email is much appriciated
June 3rd, 2008 at 6:01 am
the form works awesome! I could be wrong, but I think that you would have to change the javascript to have mutiple forms to different e-mails on the same page, correct? What needs to be changed in the code to do this?
June 3rd, 2008 at 6:24 am
doh! please disregard everything I just wrote…..I was looking at some other code….
June 3rd, 2008 at 6:10 pm
Hi mate,
I have the same issue as Justin. When I hit the submit button it also attemps to download the “FormToEmail.php” file? What could be causing this?
Many thanks and great tutorial
June 7th, 2008 at 5:29 am
My pages work but no email arrives in my inbox. I’ve checked I entered the correct address etc. I’m hosted by Freehostia and I’m waiting to hear back from their helpdesk so if anyone can help in the meantime that’d be great.
Thanks.
June 12th, 2008 at 1:33 pm
This is fucking outstanding! THANK YOU VERY MUCH. I was struggling until I hit this page. You’re my hero…for today.
June 12th, 2008 at 2:14 pm
Okay, how can I modify this PHP to allow for different forms? I have one on a page for business contacts (go to business MGR) and I have the main contact page (goes to admins).
How can I do this? Just rename the PHP file, and specify it per form?
MMMMM, good idea Blake. I’m gonna try that.
June 13th, 2008 at 8:38 am
I 2nd that. I can’t tell you how much i appreciate this.
June 16th, 2008 at 10:05 pm
thanks man
June 19th, 2008 at 10:31 pm
I tried several different form codes until I got to yours. Thanks so much! My emails are going through just fine. My issue is being able to send a blank form. I would like for the information to be required. Looks like your php file is telling it to look, so any ideas what the problem might be? I appreciate your help greatly. This was a huge help.
June 20th, 2008 at 6:12 am
Great stuff!! Thank you sir!
June 20th, 2008 at 8:54 am
I cant get this thing to work. tried 2 times. I use 1&1 and they support php
June 20th, 2008 at 6:34 pm
Thanks Man it work great
June 20th, 2008 at 8:24 pm
Dear Daniel,
Its looks cool. I have done all but not yet uploaded.Will be posting result after upload.
You are simply great and u deserve a big prayer.
June 20th, 2008 at 8:44 pm
Moreover, testing it on a system without any local server on it resulted out a download dialog box. Why? is it because it is not connected to the internet or not uploaded. Response needed!
June 20th, 2008 at 10:47 pm
Thanks, this is great, very helpfull. It’s all working except that it doesn’t seem to detect blank forms (as others have found) although the code looks as though it should. It detects invalid characters in the email OK. Tested under both PHP4 and 5.
June 21st, 2008 at 1:33 am
Hi, please can you tell me which software is best for BANNER ADS and WEB ANIMATIONS. Please. I will be glad to read from you soonext. Thanks for the Dreamweaver tutorial.
June 21st, 2008 at 3:20 am
Problem solved - If you’ve clicked the Submit button, the array $_REQUEST is never blank as it contains an element with key (name) “Submit” and value “Submit”.
In function recursive_array_check_blank($element_value), change the line
foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);}
to
foreach($element_value as $value){if($set){break;} if ($value != “Submit”) {recursive_array_check_blank($value);}}
Note that this code is working with the ‘value’ of the form’s object (i.e. the text that appears on the button), not the ‘name’ of the object.
June 22nd, 2008 at 12:38 am
Thanks heaps mate! Sends emails for me - but for some reason I get a “Submit: Submit” in the body of every message and it lets the form be submitted even if the fields are blank. I get the ‘blank emails’ delivered with a default from address added from my hosting provider and that “Submit: Submit” in the body..
But it’s better than publishing an email address on my site - so thanks!
June 23rd, 2008 at 5:04 am
Hey Dan,
Get one tx a million, had the text issue when page not found due to capital T in the MailToForm. Sorted that now though. Question though, is there a way to auto redirect away from the results page back to the website home page?
June 24th, 2008 at 2:28 am
I too have been having a problem that others on this page have also had…..when submit is clicked 404 page not found appears. I copied everything exactly the same and inserted my own email into the code then put it on the server. I know yahoo small biz allows php but i wonder if there is something I need to do on the domain management page to allow this to work? Anyone else with Yahoo out there?
Any help appreciated,
Dave
June 24th, 2008 at 4:39 am
Hopefully someone can help me. Everything works fine, except I don’t get any email reply. I am using Go Daddy, and I tried changing the php file name as the person above suggested…but still nothing. The website is sueellenking.net…click on “Request A Quote” on the right hand side and the form will come up. I fill everything out, hit submit, get the thank you page and no email. Thanks in advance for anyone who can help.
June 24th, 2008 at 7:33 pm
The Email wont work??/
June 27th, 2008 at 1:42 am
Hey, I was wondering about this tutorial. I have done everything on the tut but when I try it out in the browser the form just resets itself and then nothing is sent to my email and the page is not reset to my homepage. Any input on this?
June 28th, 2008 at 6:57 am
Hi Dan!
You saved the day at my office, as we needed to get a contact form up TODAY, and I have never made one before. It works beautifully, and my only glitch is if a person leaves the “Email:” field blank and hits “Submit”, it moves onto the “Thank You..” page and give me this message instead of applying the form validation:
“Warning: mail() [function.mail]: SMTP server response: 554 The message was rejected because it contains prohibited virus or spam content on line 116″
haha what? Not really sure why it does this instead of just telling me I need to put in the email address. It works fine if you at least type something in the box, but not if you leave it blank?
Thanks for being such a good sport with all these questions!
C
June 28th, 2008 at 7:23 am
Dan,
Hooray! Please disregard my above comment, I did some scouting around on your site and found your amazing little article on form validation. Plugged that in and it works wonderfully now! You have been awesome, and I am definitely going to be a frequent vistor on your site.
Thanks a million! If you’re ever in Florida let me know and I’ll bake you some cookies! :O)
-The happiest graphic designer in Orlando
June 28th, 2008 at 10:51 pm
I do not normaly reply to this kind of posts, but this is the first form that actually worked. Congrats man, respect for all the tutorials and the time u spent trying to teach us noobs.
July 1st, 2008 at 12:19 am
I have got the form to work in some sense, I can fill out the information and then when I press SEND the thank you page comes up, but no email was sent. How long does it take to get the email of stuff?
July 10th, 2008 at 1:05 am
I was wondering do I need to upload this to an ftp site for it to work, it wont just work through my computer and dreamweaver alone will it?
July 10th, 2008 at 7:47 am
works awesome.
July 10th, 2008 at 1:16 pm
trying to get the form to send emails and when clicked it says everything went through. I have ixwebhosting and php is turned on. What else needs to be configured? Im not getting the emails and have doublechecked
July 10th, 2008 at 3:43 pm
Thanks man this is an absolute charm!!! Thanks for sharing this tute with us.
July 11th, 2008 at 3:57 am
I have gone over this relentlessly and cannot find what is wrong. We have a local server, no godaddy type company, yet the submit button does absolutely nothing. any ideas?
July 12th, 2008 at 12:11 am
Hi Dan,
Great script. It all works fine except for one minor problem my end. I am building a secure login site using a combination of HTML and PHP. At the moment I am hosting my site using MAMP on my local machine.
The problem is when I submit the form. I get the correct response but no email appears in my inbox? Any suggestions?
July 14th, 2008 at 12:31 am
i receive the email… but during at thar time my printer and pc problem so i cannot print the dreamwaver for me again
sorry for the probelm….
July 14th, 2008 at 2:21 pm
I can’t get it to work for some reason. I think it may be my host. I have Yahoo! Small Business web hosting. I know that we are allowed to send up to 250 emails from a third party per day, but I’m not sure why your form isn’t working. I never receive the emails!
July 15th, 2008 at 11:31 pm
Hi Daniel,
Thanks for sharing your wisdom… i really appreciate it!
One quick question…
In this forum a few people have asked how do you get rid of the Submit: Submit” in the body of every email message that comes in.
Have you got any ideas?
July 19th, 2008 at 4:57 am
Great stuff. Worked first time. Much appreciated.
July 25th, 2008 at 9:55 am
hey.. thx for the tut, awesome.. but i get this:
what am i doing wrong? hmm..
i’m a dumbass with code :]
Warning: Unknown(): open_basedir restriction in effect.
File(/usr/www/users/garviz/FormToEmail.php) is not within the allowed path(s): (/usr/www/users/garvie:/usr/home/garvie:/tmp:/usr/local/lib/php) in Unknown on line 0
Warning: Unknown(/usr/www/users/garviz/FormToEmail.php): failed to open stream: Operation not permitted in Unknown on line 0
Warning: (null)(): Failed opening ‘/usr/www/users/garviz/FormToEmail.php’ for inclusion (include_path=’.:/usr/local/lib/php/’) in Unknown on line 0
August 9th, 2008 at 5:48 am
Mine is working perfectly thank you very much, the only problem is that i recieve the contact form with al its info to my e-mail, but i recieved it as if i was sendind it to everyone. dont know if i explained myself.
E.g.
my e-mail is (example) popcorn@you.com and every single form i recieve is addresed that was sent by popcor@you.com
Why is that happening? I rechecked the hole script and my e-mail is nowhere to be found, where is the contact for getting that e-mail from? And what is the default sender supposed to be? The website? http://www.mycompany.com
August 15th, 2008 at 12:22 am
Does it supports Russian Cyrillic?
I’ve tried 2 PHP forms already, all of them failed. My hosting has nothing to do with that. I use correct encoding, but still receive only rubbish. All Russian letters get converted to some ASCII symbols.
Will test yours sometime. But maybe you know the answer already?
Thanks
August 17th, 2008 at 10:02 am
Oh, thanks man! I hate scripting and I have finally found the holy grail of websites to help ease my pain. Thanks!
August 19th, 2008 at 3:22 pm
@Robert: Quote
“Hey just to let you all know, for Godaddy you just change the FormTomail.php to gdform.asp
Thanks for your help in setting up the forms though!”
I tried this. I even changed the form mailer in the account settings. Still no mail is showing up at the intended destination. Any help?
August 24th, 2008 at 6:59 am
Hi,
I have the same problem Justin discribed earlier:
I followed this tutorial for a form on my site, however whenever i go to send the message and click the submit button, it trys to download the “FormToEmail.php” file?
My form action is exactly as yours, and my php file is as exaclty as yours is.
any help?
Thanks
Theo
August 25th, 2008 at 2:01 am
Hello,
Thanks for the tutorial. However, I am getting “Page cannot be displayed” error when the user clicks on the Submit button. I am using Web.com as my host. This is for a magazine publisher. I am testing my contact form for Web related issues to direct to my email. Any suggestions?
Thanks,
Kevin
August 25th, 2008 at 10:41 am
Thanks for this tutorial.
Only problem I have is:
If I enter the email with some errors in it I have a message that says:
Email address is invalid
How do I center this error message… Also my contact form is in a table with graphics behind it.
I was able to trhow in my table in the php file so the thank you not is inside my table.
But for the error message, its not working… any ideas?
August 26th, 2008 at 3:04 am
is there a way that you can put two emails in the following line of the php file? so that the information is sent to two different addresses?
$my_email = “myemail@mydomain.com”;
great tutorial. thanks.
August 27th, 2008 at 3:37 am
*** FOR PEOPLE RECIEVEING TEH FIle NOT FOUND PROBLEM!***
The file not found problem may be happening to people who are followoing step 5, and actually copying the line of code. in step 5 is says “FormtoEmail.php” when the file is actually named “FormToEmail.php” capitol T. change that and it will sort the issue
Now a question - How can we stop the mails goign straight to jumk???
August 27th, 2008 at 3:55 am
Also guys, I noticed that a few peopel want to know how to validat ethe form. If you use dreamweaver its simple. On you comments page, in design view, select the submit button.
then select the “behavious” tab. I f you cant see this tab go to Window>behaviours. once you are in the behaviours tab click the little + button and select “validate form”. you can then for the validation of an email address, if the user doe snot input an email address a pop up box will appear advising of this.
August 31st, 2008 at 11:12 am
excellent stuff. you make it so simple.
thanks.
September 2nd, 2008 at 4:31 am
to get rid of the aubmit: at the bottom of the email, click on the submit button in DW, go to the properties at the bottom of the screen and clear out the “button name” box.
September 2nd, 2008 at 5:23 am
If you have GoDaddy, cerify whether or not you are using Linux or Window hosting. If your site is hosted on a Linux server, .php will work without a problem. If you have a windows server, .asp is the type of scripting you need.
According to support at GoDaddy, they do not have any limitation or restrictions on php scripts - at least not on Deluxe hosting. Free hosting may be different, but it would be worth your time to ask. Their support has been very helpful.
i had to request my site to be moved to Linux servers in order for the php scripting to work, which will take 24-72 hours before it is switched over. But worth the wait to make sure I can do what I need to get my site up and running. So before you spend days trying to figure out why the php script wont work, check your hosting first to see if you have Linux or Windows. This could potentially be your problem, as it was mine.
Have a Great Day!
September 2nd, 2008 at 9:49 am
Daniel,
The tutorial was excellent, “but I am still not able to get it to work. Everything is exactly as it is supposed to be. I use Bluehost as a service provider. They are closed today because it is a holiday. Request form link is where my ContactForm.htm is located. Can you look at my code and give suggestions? Please
Thanks David
September 3rd, 2008 at 12:56 am
I’m getting a message stating, “You cannot send a blank form”. Any suggestions? The web designer that created the site no longer works here. She used your FormToEmail.php for our contact page, which works, and our “Sign up for updates” (on every page), which doesn’t work. Do you know why it works in one spot but not the other? Any suggestions would be greatly appreciated. Yes, we are using GoDaddy.com and we are on a linux server but I’m assuming that has nothing to do with the problem since it is working on the “contact us” form. I saw this code in the php form,
if(!$set){$errors[] = “You cannot send a blank form”;}
Does this have anything to do with it?
September 4th, 2008 at 6:16 am
You Are my Hero, been looking all day for contact forms that work, This is amazing and really really easy to follw for beginners thanks
September 5th, 2008 at 7:17 pm
Thanks for a brilliant tutorial, but I have a query. Once I click submit, I am getting the following error:
Warning: mail() [function.mail]: SMTP server response: 550 A valid From header is required for bounces in E:\Inetpub\saiipl\FormToEmail.php on line 116
September 6th, 2008 at 11:20 am
Hey! This works ok in terms of the script, BUT when i fill in the form and click ’submit’ it says ‘you cannot submit an empty form’ even thoguh teh form was filled in…where have I gone wrong?? :s
Thanks in advance…amazing tutorial btw!
September 6th, 2008 at 11:30 am
I followed your instructions. But, I’m not sure how to insert the form on an existing page? I want to add it to the bottom of a page with all the field box visable and not have to go to a diffrent contact page. Can you give me any help.
Thank you
September 11th, 2008 at 6:56 am
[...] I forgot to mention, credit for the code of the form goes to…http://dreamweaverspot.com/adobe-dreamweaver-tutorial-contact-forms/ All I did was modify the code to my liking. « Here we go again, IE VS. [...]
September 14th, 2008 at 3:21 am
thanks this contact form works well for me
very good tutorial thanks again
September 15th, 2008 at 7:34 pm
what i done wrong?!…. when i press submit it gives me the download window for formtoemail.php:|…
September 19th, 2008 at 1:57 am
How can I make the fields required and remove the submit: submit in the emails?
Thanks this works great!
September 20th, 2008 at 7:01 am
Wow, I’ve been working on this problem off and on for a couple of days now. You’ve just saved me. I’m definitely subscribing.
September 23rd, 2008 at 8:34 am
The funny thing is that I used the script forone website (www.triniteedesigns.com) and it works fine, I then went to use it for my personnal site, but I am having problems. Both are hosted by Go daddy. Has anyone gotten to the bottom of the issue?
Thanks Tim
September 23rd, 2008 at 9:49 pm
Hey Daniel
Many thanks for the contact script - fantastic. Only one thing….
When I tested it out, I used my email address as the recipient (this email actually). For some reason it gave me the following error:
Warning: mail() [function.mail]: SMTP server response: 554 : Recipient address rejected: Relay access denied in \\nas39ent\domains\j\jaysdriving.co.uk\user\htdocs\test\FormToEmail.php on line 116
I changed the email to another and it worked ok first time - then gave me the same error…
Any ideas mate? Many thanks in advance
September 24th, 2008 at 9:56 am
finally! i found a working tutorial! thnx dude!
September 25th, 2008 at 7:06 pm
It works perfect my friend.
Thanks very much.
October 1st, 2008 at 8:11 am
I’m wondering how to do 2 more things with this code. I want to e-mail the results to 2 e-mails and I want to e-mail the user’s IP address too. How do I do that? Thanks.
October 1st, 2008 at 7:07 pm
Works great except that the php file doesn’t validate the inputs. Does anyone have an idea of what would be thw problem?
Thank you
October 2nd, 2008 at 7:34 am
Wow! Thanks so much Daniel! It works great!
I also had the 404 not found error, but I did exactly what Cynthia said, and boom! all fixed!!
October 2nd, 2008 at 6:45 pm
Hello,
Thanks so much! Ive been trying to achieve this all day..no joke! the only step which threw me was 5. you must put FormToEmail.php not FromtoEmail.php (the T has to be capitalized). Thanks again Dan
Kyle
October 6th, 2008 at 10:07 am
I seem to get the following errors when loading the form as per tutorial
Help anyone
Thanks
Shaun
October 6th, 2008 at 10:08 am
Helps to include the error message……..sorry
Notice: Undefined index: email in \\nas30ent\domains\t\travelpromoters.co.uk\user\htdocs\FormToEmail.php on line 114
Thank you
Notice: Undefined index: name in \\nas30ent\domains\t\travelpromoters.co.uk\user\htdocs\FormToEmail.php on line 133
October 10th, 2008 at 2:41 pm
hi, I am really not good at Dreamweaver, but I got it right!
one thing is that I don’t get name or comments in my e-mail.
I just get there e-mail.
What am I doing wrong…?
October 10th, 2008 at 2:43 pm
oh actually…
I see “submit”
I don’t get any subscriber’s e-mail address in my e-mail…
October 10th, 2008 at 2:51 pm
!!!!!!!
I got it!
I was making the Form for each “email” “name” and “Submit”
That’s why I only saw “submit” when i got email.
THank you~! this is wonderful!
October 12th, 2008 at 3:55 am
Hi there - I seem to have stumbled into a road block - everything seems to be working fine with the form… in that you can type in each field and hit submit which redirects me to a continuation page
however - i’m not finding the emails once the form has been submitted. i’ve changed my “$my_email = “fake@email.com”; - but it’s not getting sent there.
any ideas?
Thanks.
October 13th, 2008 at 4:43 pm
Thanks mate - good tutorial!
October 14th, 2008 at 8:28 am
I thought creating a form was going to melt my brain. Thank you for making it so easy
October 14th, 2008 at 11:04 pm
Thank you for the tutorial and free script, however I have just tested it and I get the following message upon submitting the form: You must enable referrer logging to use the form.
Any suggestions as to why this is occurring??
October 17th, 2008 at 3:17 pm
thnks man….simple, easy….
visit here http://www.hasrilhusni.com/contact.html
October 18th, 2008 at 2:02 am
i do it by tutorial. When i click on submit button. It write: Forbidden
You don’t have permission to access /FormToEmail.php on this server.
October 19th, 2008 at 1:16 am
Gave this a try live with a temporary testing site, and after a couple of false starts got it to work OK.
One problem remains some email SPs will dump the email in a “junk” folder on receipt, (hotmail) while others will accept it in the normal “inbox” (tiscali).
I tend to think this might be because there is nothing in the “From” box, so it’s filtered to the “junk” folder.
As I use mail alerts to my mobile phone, I would like to know if there is any code that I could use to just add a dummy “From” address to each email sent so that it doesn’t get filtered out as junk.
As I’m just starting with PHP I can’t see how myself, but any help would be appreciated. It would be nice to get rid of the double Submit at the bottom too.
Many thanks Terry.
October 22nd, 2008 at 6:43 pm
Bryce (See April 18th, 2008 at 12:56 pm), capitalized the ‘T’ in FormToEmail solved the problem. Cheers.
Thanks a lot Daniel!!!!!!
October 25th, 2008 at 2:30 pm
Hi,
I followed this tutorial for a form on my mates site, however whenever i go to send the message and click the submit button, it trys to download the “FormToEmail.php” file?
My form action is exactly as yours, and my php file is as exaclty as yours is.
any help?
Thanks
Marek
October 29th, 2008 at 4:10 am
HI!! Thanks it is awesome and it worked!!
I’ve still got one problem though. I tried to add a drop down list, however the value of the drop down list item did not arrive in my inbox together with the rest of the information.
Anything I can do to make this work?
Thanks again.
October 30th, 2008 at 11:37 pm
AMAZING… thank you so incredibly much!!
November 2nd, 2008 at 2:23 am
If anyone hasnt figured out yet how to put a subject or who the mail is from you need to mod. this sting..
Lines 112 - 114 on my comp.
$subject = “FormToEmail Comments”;
$headers = “From: ” . $_REQUEST['email'];
To this (make it whatever you want, this is just what mine looks like)
$subject = “Question From Customer “;
$headers = “From: Way-BrightPools” . $_REQUEST['email'];
That way you can mark it as safe and it wont go into your junk folder! Hope that helps some ppl! Took me few hrs to fig that out lol
November 2nd, 2008 at 4:33 am
Hey everyone, If anyone is have a problem with your mail getting sent to the junk folder and not having a subject. After 3 redbull and a long night i figured it out. lol Hope this helps out.
On lines 112 - 114 the current string looks like this:
$subject = “FormToEmail Comments”;
$headers = “From: ” . $_REQUEST['email'];
This is what mine looks like (change yours to fit your needs)
$subject = “Question From Customer “;
$headers = “From: Way-BrightPools” . $_REQUEST['email'];
November 3rd, 2008 at 10:04 am
Hey, Everything looks good and seems to work, but once I hit submit its taking me to the thank you page, but I never get any of the emails. I tried a few different emails and none of them get any message sent. Please Help!!
November 4th, 2008 at 10:41 pm
Hiya
Great tutorial really easy. One problem though I’m not getting a confirmation sent page, what have I not put into the code. Also same as alot of other people its going into my deleted email file - please can you advise.
Thanks
November 6th, 2008 at 11:49 pm
You guys are great.
I had a client who wanted a form immediately reading this tutorial I managed to create one chack it at http://www.exoticafricansafaris.com its working like magic
Kudos guys
November 13th, 2008 at 2:09 am
My submit button is a dead link. Everything is in the root folder on on the http://ftp. Any ideas?
November 13th, 2008 at 2:10 am
http://www.bonusproductions.com/ContactForm.html
November 16th, 2008 at 7:31 am
Mine works fine at godaddy. Very happy with the ease of fortoemail. Sweet!
November 16th, 2008 at 9:33 am
I have followed your instructions exactly. Everything else works, except that I never receive anything in my email. I use Yahoo for my webhost. I called them today, and they say everything is working on their end. I described to them what I have done, and they said it sounds like I did it correctly. This is the last thing I need to do on my website. If you could help me solve this problem, I would greatly appreciate it.
Thanks,
Cheryl
November 18th, 2008 at 5:05 pm
Thanks for this. Made my life easier today.
November 25th, 2008 at 7:04 am
When I hit submit I get the thank you page, but no email actually shows up. What did I do wrong? Help Please.
November 25th, 2008 at 7:12 am
Little more info to above post…
I am working locally on dreamweaver, I have the correct .php file name ans when I click submit after viewing my webpage from dreamweaver a window flashes real quickly and disappears and the thank you page opens up saying it sent the email to my address-that is correct also in the .php code-but I do not get the email. The first time I tried this I got the email and I was getting the pop up window to save,open, close the .php file. I checked the box to not show this message again and added two more form text fields and now I do not get the emails. What do you suggest?
November 26th, 2008 at 2:28 am
Great help -
One little quirk - In Firefox, the “Submit” button reads “Submit Query” - I think this comes off a little wonky, and I would like to fix it -
Any ideas?
Thanks,
Kris
December 5th, 2008 at 3:12 am
When I hit submit I get the thank you page, but no email actually shows up. What shall I do?
December 5th, 2008 at 3:38 am
Ok so my form looks great but when i push submit i get 64|| empty($exploded_email[1])){$errors[] = “Email address is invalid”;}else{if(substr_count($exploded_email[1],”.”) == 0){$errors[] = “Email address is invalid”;}else{$exploded_domain = explode(”.”,$exploded_email[1]);if(in_array(”",$exploded_domain)){$errors[] = “Email address is invalid”;}else{foreach($exploded_domain as $value){if(strlen($value) > 63 || !preg_match(’/^[a-z0-9-]+$/i’,$value)){$errors[] = “Email address is invalid”; break;}}}}}} } // Check referrer is from same site. if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = “You must enable referrer logging to use the form”;} // Check for a blank form. function recursive_array_check_blank($element_value) { global $set; if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}} else { foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);} } } recursive_array_check_blank($_REQUEST); if(!$set){$errors[] = “You cannot send a blank form”;} unset($set); // Display any errors and exit if errors exist. if(count($errors)){foreach($errors as $value){print “$value
“;} exit;} if(!defined(”PHP_EOL”)){define(”PHP_EOL”, strtoupper(substr(PHP_OS,0,3) == “WIN”) ? “\r\n” : “\n”);} // Build message. function build_message($request_input){if(!isset($message_output)){$message_output =”";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace(”_”,” “,ucfirst($key)).”: “.build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).”, “;}}}}return rtrim($message_output,”, “);} $message = build_message($_REQUEST); $message = $message . PHP_EOL.PHP_EOL.”– “.PHP_EOL.”"; $message = stripslashes($message); $subject = “FormToEmail Comments”; $headers = “From: ” . $_REQUEST['email']; mail($my_email,$subject,$message,$headers); ?>
so i know that the code is wonky but im not sure were, any one with a good fix
Kenize
December 11th, 2008 at 2:43 am
I will try it.
December 12th, 2008 at 2:19 pm
Has anyone figured out the “you cannot submit a blank form” error? That’s what happens when I hit the submit button. I think it was mentioned in a previous post but no solution.
thanks in advance
December 14th, 2008 at 9:53 am
Wow! This actually works! I’ve been searching and searching all over the web for an easy-to-use tutorial like this! Thank you VERY much!!!!!!!!
Now, if you could only email me to tell me how to centre AP Divs within a #wrapper or container!
Again, thanks!!!
December 19th, 2008 at 1:32 am
Thanks for the code, i followed the tutorial but whe i hit submit it give me the following error,
The page cannot be displayed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
——————————————————————————–
Please try the following:
Contact the Web site administrator if you believe that this request should be allowed.
Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
HTTP Error 405 - The HTTP verb used to access this page is not allowed.
Internet Information Services (IIS)
——————————————————————————–
Technical Information (for support personnel)
Go to Microsoft Product Support Services and perform a title search for the words HTTP and 405.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Setting Application Mappings, Securing Your Site with Web Site Permissions, and About Custom Error Messages.
Please help me
i really need this form to work.. here is a link to my page http://www.safindo.co.za/contact%20us.htm
December 22nd, 2008 at 2:15 pm
Great help, thanks: but I’ve only one request: If I can to extend this to cover a few other text fields, such as address, phone, fax, etc, can you suggest please what I need to add for that/each one?
(I did already scroll through the replies above…)
Many thanks,
P
January 3rd, 2009 at 12:43 am
I have the correct .php file name ans when I click submit after viewing my webpage from dreamweaver a window flashes real quickly and disappears and the thank you page opens up saying it sent the email to my address-that is correct also in the .php code-but I do not get the email. The first time I tried this I got the email and I was getting the pop up window to save,open, close the .php file. I checked the box to not show this message again and added two more form text fields and now I do not get the emails. What must i do ?
January 4th, 2009 at 11:09 pm
I have done every thing accroding to the tutorial,but i dont get any emails.It doesnt give me any errors on the website when i send the comments,it only says your message has been send! What do you suggest?
January 8th, 2009 at 1:26 am
Thank you for the script. I had some difficulties making it work. It was looking for a SMTP address. I found the following fix at http://drupal.org/node/341969
Add the following code to the top of your email script if your mail script continues to fail.
// Please specify your Mail Server - Example: mail.yourdomain.com.
ini_set(”SMTP”,”mail.YourDomain.com”);
// Please specify an SMTP Number 25 and 8889 are valid SMTP Ports.
ini_set(”smtp_port”,”25″);
// Please specify the return address to use
ini_set(’sendmail_from’, ‘ValidEmailAccount@YourDomain.com’);
January 10th, 2009 at 1:56 am
Hi.
I have searched and tried every possible contact form on the net. But none of them ever worked.
After almost giving up, I tried your tutorial. And it worked!
THANK YOU VERY MUCH!
January 16th, 2009 at 7:48 am
This is a great script, is there any way that the redirect page can be manipulated to be centered on the page with a back button or text?
January 25th, 2009 at 11:57 am
Tnku so much dis helped me alot
xx
January 27th, 2009 at 6:08 am
Has anyone figure out how to make this go to 2 emails rather than just one?
$my_email = “youremail@domain.com”;
February 4th, 2009 at 3:57 am
Hey! thanx!! it worked!!!!
bye!
February 5th, 2009 at 8:45 pm
Hello
Thank you for the tutorial, however i have made sure all the scripting is correct but when i click submit i get an error message
“Error 403 - Forbidden
You tried to access a document for which you don’t have privileges.”
Could you please help me? thank you
February 8th, 2009 at 7:30 pm
Great dude …Too simple.. i tried it and only in 5 min. i got my “Contact Me” page, ready to use..
Thanks a lot dear..
And for other READERS…
u can add as many field eg. address, phone etc. as u want.
just follow insert/form/.. in dreamweaver.
I m using 6 fields in my form..
Thank again…
February 10th, 2009 at 7:31 am
I wasn’t receiving email until I made sure the domain extension in the email was the same as the domain extension of the site. If you tell it to send to joe@blue.com and your form is on green.com then it may not work. But if it’s on blue.com it will. OK, that was stupid but hopefully helpful.
February 14th, 2009 at 1:38 am
Hi Dan
been trying this for the whole day, have created the form as said but on my local machine when I hit submit I keep getting a file download box asking me to save or open which it does open the original script in dreamweaver and I have posted this live but get Cannot find “http://www.butterflyphotos.co.uk/FormToEmail.php”
message. It also mentions a DNS server error, is this something to do with my host. I look forward to a reply before I tear my hear out and give up completly
Thanks
February 18th, 2009 at 1:41 am
Hi,
I downloaded your form and used it to the letter, but I don’t seem to be getting the emails. I get the “message sent” confirmed page but they don’t appear in my inbox.
I use Yahoo! as my web host. I saw that others have run into this problem as well.
Has anyone found a solution through Yahoo!?
Thanks for your time.
Randy
February 18th, 2009 at 3:40 am
Played with it for a couple of hours and got it to work for my job’s website. Thanks a ton! Keep doing what you do, cause it saved my bacon.
February 19th, 2009 at 1:14 am
I get the same error message as Amar c, once I click submit, i get a forbidden access message. thoughts anyone?
February 19th, 2009 at 2:08 pm
I put the code in correctly and uploaded everything including the PHP file to my server. When I click on submit, nothing happens at all. It doesn’t even appear to be trying to load or get anything. What have I done wrong?
February 22nd, 2009 at 9:55 pm
For your email, choose a hotmail email. Certain email hosts wont work. You will have to register your own email and do it that way.
Hope this helps all you that cant get it to send email.
February 22nd, 2009 at 9:57 pm
also, I have certain problems, when I recieve the email it comes from ‘Unknown sender’ how do I change it so that the email address typed in the ‘your email address’ box is the one that sends it, also. how do I change the subject.
February 24th, 2009 at 11:35 pm
jeanie-tallis@live.co.uk
if any of you are experiencing problems with this code. Please add me, Ill help you out.
February 24th, 2009 at 11:44 pm
I found this on another website, it comes in handy. Design your form. Eg:
Name
Email
Submit. They should code out as follows (if not exact, be careful but you can change the code)
//Name
//Email
//Submit
(Then underneath Tag put)
$email = $HTTP_POST_VARS[email];
$mailto = “email@address.com”;
$mailsubj = “Form 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)) { $mailbody .= “$key : $val\n”; }
if (!eregi(”\n”,$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
Its not the best code, but its good if you cant use the above.
Not all email addresses work, due to server access. Though, I know hotmail/live/msn works.
February 24th, 2009 at 11:45 pm
oops sorry for above it came out wrong
Email jeanie-tallis@live.co.uk if you want the full code. Ill email it. Thanks
February 26th, 2009 at 5:44 am
Suhhhhwwwwweeet. Got this all to work on my website. It’s very user friendly in my opinion, and I’m having no troubles adding text fields in the HTML form and having them sent to me.
I’m also using GoDaddy.com and they were very helpful in setting my hosting setup to be able to use .php like this AND .asp.
Thanks a lot!
March 11th, 2009 at 5:41 am
the script works great! easiest thing i ever installed, seems like. nice job on the tutorial.
however, i have a concern that i read about in another tutorial that was not addressed here. does this script have spam safeguards? whats to stop a spammer from turning our email address that the message is sent to into a “bot”? doesnt there have to be a CAPTCHA functionality in order to prevent that?
please advise ASAP. thanks!
March 11th, 2009 at 5:58 am
to be clear, i want to both avoid getting SPAM’d myself with incoming spam, and avoid my form being a catalyst to spammers spamming other people.
March 16th, 2009 at 8:59 am
Took me awhile to get it to work but I now have a comment page for each staff member and am having a great time figuring out how to format it all.
THANKS!!!!!!
March 16th, 2009 at 11:00 pm
For you Godaddy users. You must be using linux.
March 18th, 2009 at 12:02 am
It worked great! after renaming the PHP file “fromFormToEmail.php” to “FormtoEmail.php” and making sure that my form was also pointing to “FormtoEmail.php file not to “FormToEmail.php”.
Thank you very much!
March 18th, 2009 at 7:57 am
can anybody help? thanks!
March 22nd, 2009 at 3:19 pm
Have completed the form, but upon clicking “submit”, receive the following error:
Method Not Allowed
The requested method POST is not allowed for the URL /FormToEmail.php.
What am I missing?
March 23rd, 2009 at 8:39 pm
This was super easy and I thank you! Worked like a charm and that was on the first try!
March 24th, 2009 at 9:11 pm
Hi,
I followed your instructions and tried testing it though i got the following error:
Warning: mail() [function.mail]: Could not execute mail delivery program ‘C:\PHP5\sendmail\sendmail.exe -t’ in C:\Domains\zammit-law.com\wwwroot\FormToEmail.php on line 96
line 96 refers to
mail($my_email,$subject,$message,$headers);
Can you please help me out?
March 26th, 2009 at 8:17 am
Hello everything seems o be working great but when i hit the submit button i don’t receive it in my email have any idea why? oh and thanks a bunch:-)
March 27th, 2009 at 8:03 am
can anyone please give advice on adding captcha? thanks!
March 27th, 2009 at 3:32 pm
IF YOUR CONTACT FORM DOESNT WORK HERE ARE SOME POSSIBLE FIXES:
1. If you are getting a weird error, first make sure that in your code the action=”FormToEmail.php is spelt corredtly, in the tutorial it was spelt incorrectly which was action=”FormtoEmail.php (the t in to is lower case, should be upper case “T”)
2. If everything seems to be working correctly but you are getting no emails. Your email domian name has to be the same as the domain of the site. Example, if the site is call http://www.AwesomeSite.com, the email hase to be “something”@AwesomeSite.com where “something” can be whatever you want but you have to have the @AwesomeSite.com
3. If the site is giving you a link to Download the .php file that means your domain host doesnt support it and you need to switch over to the .asp version of the file.
Hope that helps, and yes im awesome! lol =P hope I helped someone
March 28th, 2009 at 5:49 pm
good steps
March 31st, 2009 at 6:59 am
thanks for this tutorial
March 31st, 2009 at 12:41 pm
I just finished following the steps you providd and it looks good. I am testing it via dreamweaver. When I hit F12 IE 7.0 automatically displays the page in IE but when I hit submit (after entering information), I get the following ‘Do you want to save this file’ I will be hosting my page on Yahoo small business, and the support PHP.
Also, I will like to know where in the folder do I need to save the php file (Root Folder or sub folder)?
April 2nd, 2009 at 4:26 am
Thanks for the tutorial. when I hit the submit button I get this message:
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for eric@daystaronline.net in C:\xampp\htdocs\DFC\FormToEmail.php on line 11
Thank You
Your Message has been sent.
Any help would be greatly appreciated thanks
April 7th, 2009 at 2:38 am
The directions are wrong! It says: “In the Action text box type in FormtoEmail.php.” But you must actually use the CAPITAL T or it won’t work. You must type FormToEmail.php then it will work great. Can you fix this in the instructions please? Thanks and great job on the script.
April 7th, 2009 at 11:41 am
Thanks, it helped. But what is a FormToEmail.php? I’ve never heard of it before, and I can’t figure out what it is just from this.
April 8th, 2009 at 3:18 am
i have made my form useing this tutorial but i wanted to insert some check boxs into it aswell im fine with doing it in the dreamweaver 8 and have made the form now but i dont have a clue how to edit the formtomail.php script to allow this could some one help just to were to place the lines of code in the script and if possible the code i would need to put in there would be great to see what im trying to do visit http://www.etesia.co.uk/ContactForm.html
April 8th, 2009 at 5:02 am
Is there any way to make sure you’re not getting spam? I read through the first comments but there are a lot so maybe this already got answered but.. I was thinking maybe adding a field that asks a yes or no question just to make sure a human is typing the email? Just wanted to know if that is even a good idea, or that should even be a concern with contact forms?
Thanks.
April 9th, 2009 at 6:05 am
This is a great tutorial! But how would I make the PHP page a popup after the use clicks submit?
April 9th, 2009 at 10:01 am
Tacha, I’m guessing your webhost doesn’t support webmail.
Different webhosts come up with different errors,
Jeanie-tallis@live.co.uk
I shall help all you with problems all I can.
April 16th, 2009 at 6:33 am
We are hosted on GoDaddy and have gotten this to work.
But i wanted to know if you can point me to an article about how to attach a file to the email being sent out?
-Josh
April 19th, 2009 at 1:47 am
[...] A number of you have already added a form using Dreamweaver, but they are not yet fully operational. Today, we will go over a simple way to add functionality using the tutorial over at Dreamweaver Spot. [...]
April 22nd, 2009 at 9:32 am
what does this mean?
Warning: mail(): SMTP server response: 501 Your domain does not seem to be valid. Could not find MX record for your domain. in C:\Inetpub\vhosts\mydomain.org\httpdocs\FormToEmail.php on line 116
April 28th, 2009 at 4:39 pm
Hi,
I’m creating a new website for my Aikido class, and I was really having a hard time with finding out how to make the submit button work.
Thank you very much! Your tutorial was easy to follow.
Janice
April 29th, 2009 at 9:59 pm
I get the error
“You must enable referrer logging to use the form”
whats this?
April 29th, 2009 at 10:06 pm
have sorted issue.
Switched on logging in opera.
found this to help sort errors:
http://formtoemail.com/support/referrer_error.php
May 5th, 2009 at 8:36 am
I found your tutorial and downloaded the php file. It was a great tutorial that was easy to follow.
Unfortunately, everytime I click send, I get 404 file not found error message. I’ve have uploaded all the relevant files for this to work and changed the file name and checked that it all correct and it still does not work. I’m using IX web hosting. Is there a reason why this should continue not to work
May 9th, 2009 at 3:06 am
I love this script so much I actually bought it - worth every penny and then so more!!! The new version is even better than the original!! The commenting is awesome!
I was wondering though, has anyone figured out how to send the email to addresses stored in a MySQL db table?
I added the Require statements for the DBConn file, also I created the RecordSet and added:
$my_email = “$row_RSdealerforms['dealer_email']“;
Unfortunately that breaks it. Suggestions?
May 12th, 2009 at 6:02 am
It was a great simple tutorial which works, but there is one problem.
When I check the email where the message was sent to, No email address from sender, No Subject Line. Why is that?
May 13th, 2009 at 10:06 am
Thank you!! After searching for HOURS on how to actually have my form e-mail me the submissions… your tutorial has allowed me to *easily* create a working form.
Thanks again, I can rest now…
May 14th, 2009 at 4:20 am
Very nice…. but how can we add an image? please help thank you….
May 15th, 2009 at 2:51 pm
I have added the files to my folder but my website is not live yet. I am just learning to create web pages in dreamweaver but do have some HTML experience. When I opent he web page on my local computer and try to submit it actually opens the .php file. Will the form only work once I get it on a live web server? Feel free to email me about this at jasons1012@hotmail.com
Thanks,
Jason
May 17th, 2009 at 12:37 am
hi,
Thnx a lot…
I tried your script. first it didnt worked, but after renaming the file as FormtoEmail.php it worked.
The subject of the email comes as “FormToEmail Comments” - is there any way to change this subject of email??
Thnx a lot once again
May 17th, 2009 at 11:14 pm
Hi,
Great tutorial although when I press submit it links to a page of script. Some one above said this maybe due to your host not supporting php although I haven’t loaded it up yet so it’s just local.
What can I do?
I’m a dreamweaver novice so I don’t no how to switch from php to asp. although that may not be the right thing to do.
cheers
May 20th, 2009 at 6:33 am
Hi
Thanks for the tutorial. I am trying to tie in my froms from my email server with the dreamweaver application . Do you know how to do this ? Or could you send me in the right direction?
tnaks
May 22nd, 2009 at 12:26 pm
The easiest tutorial i’ve come across and it works! However, on one of my websites I’m getting this error after hitting “submit”: The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
Can you help me out with this one?
May 23rd, 2009 at 12:10 am
Followed step by step but not getting any emails??
May 23rd, 2009 at 12:11 am
followed step by step but not getting any emails through??
May 24th, 2009 at 10:11 am
Thank you so much! Dreamweaver was being a pain with the mailto: function. This works much better! Thanks so much!
May 25th, 2009 at 9:57 pm
hey visit http://www.ellerge.com
May 25th, 2009 at 10:59 pm
Hi there, thanks for the great file and tut.
For de people who says they only can donwload de php file…. This is because you first have to put everything online! (not local)… otherwise it will never work!
Hopes this will help some of you!
R.
May 31st, 2009 at 1:52 pm
I had to twiddle around with your Form, but it works great. You forgot further instructions, as to the ’subject’ line in the email being received. Add item 11:
Change $subject = “FormToEmail Comment” to = “your subject line” to clearly identify the incoming email message.
June 7th, 2009 at 9:17 am
Hi there, thanks for the tutorial - I keep getting an error message : “Error 403 - Forbidden You tried to access a document for which you don’t have privileges.”
I have tried changing the case of the T in FormToEmail and checked my code - no luck. Can you help me out?
June 9th, 2009 at 1:47 am
Thank you so much! Best tutorial of all.
I have only one problem, even if I left empty fields it will still send the mail.(something I dont want) What values should I change in order to avoid sending the mail with empty fields?
Thank you again
June 10th, 2009 at 8:25 am
Did anyone work out what to do when the form is completed all that happens is the error message ‘you cannot send a blank form’ pops up (even though everything’s filled in.
Any hints appreciated.
June 13th, 2009 at 9:26 pm
I have a 405 error. It’s saying a programming error. I have converted it to asp because the package i have with the hosting company does support php. Please help
June 13th, 2009 at 10:15 pm
Great stuff, many thanks for your help - would never have got there otherwise!!!
June 15th, 2009 at 4:18 am
I use network associates. No problem using any script
June 17th, 2009 at 2:51 pm
Having major drama’s, have created a form as a Html( action = mailto:) However, doest do what i want it too do, I want to create a PHP form, so i followed this and when i tested it out when i hit submit it directed through to the pho file and asked to open or save??? so dont get it, I am doing something wrong?
- I want my submit button to do three things 1) Clear the form, 2) Email the form 3) redirect user to a Thankyou page.
I have done all the work in a html page, created the form added all relevant fields, it does email the form, however if i ask it to redirect user as a behaviour it doesn;t email the form,
Can anyone help me?? Do i have to open a new blank PHP page and start all over again??Can i insert and use my existing template and just enter in the PHP code? Thanks
June 17th, 2009 at 4:08 pm
After clicking submit, I get the error invalid email address, but it’s correct in the php file. Why is this happening?
June 20th, 2009 at 1:34 am
Hi,
Managed to get the form to work with godaddy you just need a linux setup and rename the form gdform.php…
but my problem is it seems to just stop working after a few days? it will send lovely and then i do another test the next day and i don’t recieve the message?
Any ideas why it would just stop working after a few days?
June 23rd, 2009 at 2:16 am
Hi,
Thanks for the Tutorial.
I am getting an error on pressing the submit button.
“You must enable referrer logging to use the form”
Can you please help me withthe fix?
I am a newbee in this arena and not much conversant with codes.
Regards,
Amit
June 23rd, 2009 at 11:42 am
Hey,
So I’ve been trying to implement your form - it’s working alright in every way, however, blank forms are submitted without problem… it appears that it doesn’t work!
Thanks,
Doogie
July 2nd, 2009 at 5:04 am
Has anyone figured out how to get the email address to show up when they submit the form? It shows as blank for me still. I’ve scanned through all the comments and haven’t found it.
This form is great by the way! Thanks so much for the info!
July 3rd, 2009 at 8:52 pm
Hi. thanks for this form processing.
one question: I wanna use this form for arabic characters. when i use this form, mail has sent contains just “???”.
any idea?
thnx.
July 9th, 2009 at 9:49 am
This was very helpful thanks alot!!:)
July 12th, 2009 at 12:40 am
Awesome man ! I have been mucking around with these hosted form-mail deals, and read some tutes for creating a ’simple’ contact form that were way too heavy for a php dunce like me. I can’t believe how easy your tute was. When I was testing and pressed the submit btn, I was for sure expecting an error, but it worked first time ! You rock !!
July 17th, 2009 at 7:33 am
Hi I am confused the form works, thanks..real simple.. but I get the following when testing it on line ..try it and see
Notice: Undefined index: name in E:\domains\m\mrufc.co.uk\user\htdocs\FormToEmail.php on line 133
same for line 114
my website is on my c drive/docs and settings etc
July 21st, 2009 at 3:25 pm
Hi,
I tried your code and i keep getting an error message like the below one:
Page not found
The page you are looking for might have been removed,
had its name changed, or is temporarily unavailable.
——————————————————————————–
Please try the following:
If you typed the page address in the Address bar, make sure that it is spelled correctly.
- Click the Back button in your browser to try another link.
- Use a search engine like Google to look for information on the Internet.
——————————————————————————–
HTTP 404 - File not found
Please advise on what am i doing worng.
Thank you in advance
July 24th, 2009 at 11:45 pm
Hi, I used this tutorial to set up a contact/enquiry page and although the basic page worked right off the bat, it took me a couple of attempts to modify it to what I wanted; now it is working properly and I am a happy bunny. Thanks very much
July 25th, 2009 at 7:49 am
Cool tutorial. Solved a huge problem for me!
Everything works. I would just like the Thank You to be in the same template as the rest of my website.
How do I do that?
July 25th, 2009 at 8:07 am
I LOVE THIS SCRIPT & Tutorial!
THANK YOU THANK YOU THANK YOU THANK YOU!
After three days 7 scripts, and a 30 min call with my host.
This is the script that WORKED!
I have a godaddy deluxe hosting account, and their script policy SUCKS! But this script works, any way. I think its because its php, and not cgi. godaddy has scripts, but if you use it it tags the email with the primary host account, and will only send to one email account. SO, if you have more then one domain their script defeats the purpose.
I’ve used godaddy for 4 months as i learned about hosting, web design, and web mastering. Often, their policies, and misleading statements about their products have impeded my progress. Especially for a newbie trying to figure it all out. I am going to have to leave godaddy - even if it is going to be a pain in the butt doing so.
July 27th, 2009 at 10:31 am
Hi,
When I tested this on the site it kept saying “You cannot send a blank form”.
Any help would be appreciated.
August 1st, 2009 at 2:02 am
It wasn’t sending emails for me and then I realized I made a silly stupid mistake (had a extra “.com” in my email address). Once that was fixed it worked PERFECTLY.
I can’t believe how simple this is. And I can style my forms however I want.
I love you! You are a GOD!!!!!!!!!
Thank you for sharing this tutorial and especially the PHP code.
August 1st, 2009 at 2:07 am
One question, though. Does anyone know how to make certain fields required? I have three fields I’d like to make required, but currently, there is only an error message for a blank form.
Thanks!
August 2nd, 2009 at 2:57 pm
Hi Daniel,
Great tutorial, it worked for me instantly! However, I’m wondering how to skip the page that says “Thanks, we’ve received your email, click here to continue” and go directly to a “thank you” web page I’ve built. Right now my users are directed to the php thank you page and THEN my own thank you page. I want to skip the php page.
Any ideas?
Thanks,
Tim
August 2nd, 2009 at 2:59 pm
also, I’d like to customize the subject line from “FormToEmail comment” to “Photography Enquiry from [Name]” using the name field I created. I’ve figured out how to change it to “Photography Enquiry from” but I don’t know how to link to the name entered. Thanks!
Tim
August 4th, 2009 at 7:29 am
Was getting asked if I wanted to download the php file now gettng this
Method Not Allowed
The requested method POST is not allowed for the URL /FormToEmail.php.
——————————————————————————–
Apache/1.3.33 Server at http://www.crowns-psd.co.uk Port 80
It get quite frustrating.
Regards
Rob
August 4th, 2009 at 7:36 am
Now it just asks to download Dreamweaver.
Computers dont you love em
Arrrgghhhh
Will be mint if I can get it to work.
August 5th, 2009 at 12:00 pm
I’ve just uploaded everything and I keeping getting a NOT FOUND (form url= http://www.neoistsynthesis.org/join.html) . I followed all the steps, everything seems to be where it should be, and it’s still not working. I’m on Bluehost.
August 6th, 2009 at 4:48 pm
I was also getting the ‘file not found’ error msg. I had everything set up correctly.
But after I set the permissions on each file, the form worked.
In the FTP window, I selected the file and clicked ‘get info’ (I use Fetch). After selecting ownerships and permissions (allowing the files to be viewed and execute), it worked.
I’m not on godaddy. I have a site there and will try the script on it. This worked on Earthlink.
Nice script so far - thank you!
August 11th, 2009 at 4:14 pm
God bless you. For all the 940 pages of my Dreamweaver 8, I was not able to figure this out. Then google brought me to you. Many thanks!
August 12th, 2009 at 11:55 am
The filename is case sensitive, the file FormToEmail.php has the word ‘To’ capitalized. For some reason this tutorial does not capitalize ‘to’ in ‘FormtoEmail.php’. Hopefully this helps those getting file not found errors.
August 13th, 2009 at 8:27 am
This worked very very well!!! FYI, to everyone who uses this tutorial, follow his step word for word and it works!!!
August 20th, 2009 at 6:44 am
I get this error:
Warning: mail() [function.mail]: SMTP server response: 554 The message was rejected because it contains prohibited virus or spam content in D:\Hosting\4799446\html\contact\FormToEmail.php on line 116
August 21st, 2009 at 10:41 am
Hey guys. W’ve been trying to get a form on a website we are working on for quite some time. Right when we thought we finally did it, we got this after we clicked send….
The requested method POST is not allowed for the URL /form-post.php.
what does this mean? Did we do something wrong?
Please Help!!!
Jared
August 24th, 2009 at 9:39 am
ERROR ENCOUNTERED :
Method Not Allowed
The requested method POST is not allowed for the URL /FormToEmail.php.
———————————————————-
Apache/1.3.39 Server at “website_name” Port 80
PLEASE HELP !!!
August 24th, 2009 at 11:07 am
When I click the submit button (while previewing) in the forum i get this in my browser Firefox can’t find the file at /J:/JBLSite/contact. Does anyone no why?
August 27th, 2009 at 3:19 am
thank you, this page was VERY helpful
August 28th, 2009 at 2:25 am
Everything was easy until the part when i went to test it. vansonleathers.com/ContactForm.htm when you click on submit button it brings me to the The page cannot be displayed. What am I doing wrong? Someone please help me.
Thank You
Heather
September 1st, 2009 at 7:43 am
Hi, I copied the whole tutorial into DW cs3 and uploaded to my server (MediaTemple) but when I test the form and click submit, nothing happens, the information stays the same and no email is sent. I checked the pages for typos but nothing, everything is good but the form doesn’t work
September 3rd, 2009 at 1:42 pm
hi there… i want my form in a table so it is properly aligned. however, all i get in my email box is a letter that says:
submit: submit
none of the date comes over!
i’ve deleted and rebuilt, and now i don’t even get the continue page… can you look at my page and see what could be wrong???? thanks!!!
louise
September 3rd, 2009 at 8:50 pm
Hi,
First of all thanks for this tutorial.
I’m making a website and it’s not online yet so i’m working on it in on my local server…
When I did this tutorial and pushed send, to try it out, I got the question if I wanted to download the “FormToEmail.php” file also the no emails arrived in my inbox..
The action is the same as yours.
I do not know what is the problem.
Look forward to hearing from you.
Thanks
Tiziana
September 8th, 2009 at 9:45 am
thanks! works great
I wanted to add in a autorespond email… not sure how with this script… any ideas?
September 8th, 2009 at 12:17 pm
also, wanted to add.. not getting very good error handling… stray marks in the email field are being picked up, but blanks forms can be sent, form missing name… not sure why it not picking up these errors..
FF browser, Godaddy linux hosting
September 8th, 2009 at 11:34 pm
At first I could not get the form to work on my work DEV server which I found out is not set up to work php. I dropped the files onto my personal web site space and tested. Works perfect. I too have a few questions.
Can you get it to have FROM email when you get submissions?
Can you turn off the SUBMIT=Submit result or will that always just be there?
Is there a simple way to have this info be collected on the server or is the email the final function?
Thanks,
-e
September 11th, 2009 at 9:51 am
Hi! I was surfing and found your blog post… nice! I love your blog.
Cheers! Sandra. R.
September 12th, 2009 at 2:57 pm
Words cannot express my thanks for your script and tutorial. I’ve looked long and hard for something that works this well and so easily.
September 14th, 2009 at 1:42 pm
Excellent step by step tutorial. thanks alot.
September 15th, 2009 at 5:38 pm
Hi there,
I’m testing on FF and Safari and the form is working although it’s not checking for a valid email / name / comment. If I click on the boxes but just leave them empty and press send it goes to the thankyou messae sent page - Does the php scrip include validation I thought it did - any tips on how to get this working?
September 15th, 2009 at 9:38 pm
I keep getting the error:
Warning: mail() [function.mail]: SMTP server response: 554 The message was rejected because it contains prohibited virus or spam content in D:\Hosting\4429413\html\FormtoEmail.php on line 116
Any ideas? I’m getting the same error on http://www.brezelpower.com/order.html
On another site: http://www.successtechniquesforteens.com/contact.html
I keep getting “You cannot send a blank form” when submitting content.
Any ideas for the two errors?
September 16th, 2009 at 12:13 pm
I am not getting any errors, however it doesn’t seem to be actually sending the info to my e-mail. Triple-checked and the e-mail address is correct. I’ve been using dreamweaver for awhile now, never did this before. My website is through Yahoo. Perhaps they don’t allow third-party scripts?
Thanks,
Andrew
September 19th, 2009 at 11:05 am
I tried to use your contact form but it does not work. There is no image so you can enter the code - I guess that answers one of the questions I was trying to ask you.
I was looking at buying the Learn how to create Killer Contact Forms. Does it teach how to make forms with being able to upload attachments and also including kcaptcha
September 23rd, 2009 at 7:20 am
Any idea if you can send to multiple e-mail addresses? I copied the $my_email line and added other addresses, but it appears that the only address that receives the e-mail is the last address.
October 1st, 2009 at 2:04 am
Absolutely brilliant tutorial, explained very well and works a treat. Thanks very much.
October 3rd, 2009 at 7:59 am
I am using the FormtoEmail script and it works fine. I am trying to figure out how to have the script take you “back” from the last web page you came from when you click on “click here to continue”. I have no problem putting in a URL, but I need the browser back command to run. I know it in HTML but not PHP, help and thanks
October 6th, 2009 at 10:53 am
i cant get the custom thank you page to come up after i submit. once i press submit on the form, it sends me to the default php thank you page. i would like to be directed to a special thank you page i created. can you please help with that.
besides that, GREAT SCRIPT AND TUTORIAL, saved my life. you guys are great.
October 8th, 2009 at 10:08 pm
Hi,
I have a tip for anybody who is having trouble with the contact form. In the preference panel (when you click on the form tag) you have to set the Enctype to: multipart/form-data
If you don’t do this you will get an error message that reads: cannot send empty form. I got the form to work fine, make sure the PHP file is in the exact same folder that your contact form is in.
October 10th, 2009 at 11:50 pm
I just wanted to say THANK YOU!!!! This is such a good forum!
October 12th, 2009 at 10:05 am
Good tutorial.
October 13th, 2009 at 6:22 am
Okay, you’ve got a mistake on this tutorial:
You are saying that we need to type in
FormtoEmail.php
for the form action.
But the actual file name that we download and unzip is
FormToEmail.php (capital T)
Works now!
October 14th, 2009 at 10:33 pm
Hi, I have just (reasonably) successfully uploaded Contact Form etc with the help of your tutorial - great stuff.
I have installed it with a web page I had previously designed and all is well.
My only query is that when I submit the form, I get a message viz: PHP Notice: Undefined index: name in D:\websites\losa510621\www\FormToEmail.php on line 133
I have identified this “name” on line 133 of the php page but am not sure what I should be substituting in place of the “name” to avoid getting this message.
Can you please adise?
many thanks
October 16th, 2009 at 10:18 am
I’m not sure how secure this is but it worked like a charm. I’m happy
I wanna say thanks.. like over and over again.
…and bow.
Okay, you got it!
XD Cheers mate!
…well, do you listen to Kurt?
October 26th, 2009 at 4:29 pm
Things go well on small business yahoo site, but nothing is getting into the email.. Any ideas ? for yahoo small business host? has anyone figured theirs out?
October 27th, 2009 at 8:25 am
I run my site on my local machine.
when I click submit the I am asked to open or to save the formtomail.php
what I am going wrong?
Shlomi
October 30th, 2009 at 3:54 am
Iam new with dreamweaver and php, I did everything but when I click on submit I got the page from php as a code not the thank you page, could some one help me with this
October 30th, 2009 at 10:27 am
Any solutions to Yahoo small business??
It’s been almost two weeks…I’ve tried asp but they don’t support.
I’m using dreamweaver too, and Submit goes through well, brings up the “THanks your message has been sent”.
BUT nothing is being sent.
Is there something to this form with Yahoo?
Can someone please help me out. the code seems to work. but nothing is going through.
November 2nd, 2009 at 6:18 am
is there some way to use this form to email to a yahoo account and not deal with the godaddy hosting issue?
Great tut! thanks!!
November 3rd, 2009 at 3:13 am
Very nice tutorial, thank you. Would you be so kind as to tell me how to bypass your “Thank You” page and go directly to my own? If you prefer not to divulge how to tweak your code I would be happy to pay for a version that allows this.
November 6th, 2009 at 12:16 pm
For those who have problem with redirection, simple do this and it will do the trick, i use this after hundreds of attemps and then i got it right
in the php file, go in line 126 and you will see meta tag, simply remove the old meta tag with this meta tag
then save it and upload it, after hitting submit button , it wont go to white page of thank you, it will go the page of your desire,
Have fun and also MANY MANY THANKS to DANIEL for this simple script, now which is more useful and easy to handle.
November 6th, 2009 at 12:19 pm
For those who have problem with redirection, simple do this and it will do the trick, i use this after hundreds of attemps and then i got it right
in the php file, go in line 126 and you will see meta tag, simply remove the old meta tag with this meta tag
(remove xx with tt)
then save it and upload it, after hitting submit button , it wont go to white page of thank you, it will go the page of your desire,
Have fun and also MANY MANY THANKS to DANIEL for this simple script, now which is more useful and easy to handle.
November 7th, 2009 at 6:28 am
Hello,
Thanks for this nice tutorial.
I have followed everything as directed. When I hit the Submit button, it shows FormToEmail.php code.
Please help
Thanks
November 12th, 2009 at 8:26 am
I was wondering if there is a way to have the email address of the person submitting the form to show up as the from address in my inbox? right now it ends up as anonymous@mmm1409.sanjose14-verio.com
If it could be the person’s real email that would be great.
Thanks,
JT
November 16th, 2009 at 9:12 am
How do I remove meta tag (xx with tt) as soody recomemded. I cannot find any xx on line 126.
This what i have on my line 126
What do I need to replace here so that it can go the page I want it to go.
Thanks
November 16th, 2009 at 12:29 pm
G’day,
Worked like dream cheers mate, for a great script…Hey even added mandatory fields
Cheers again,
Marie
November 17th, 2009 at 8:30 am
Hi dude,
Looks great but any many others I get a popup to download/open the php file. What to do?????
Pls help!
November 19th, 2009 at 8:16 am
Thanks for this great tutorial!!!!
I have a question, I created the contact form in a new page..but now I need to insert that form into an existing website in an specific place and I really don’t know how to.. Do I have to create an AP div? Can I just go to insert and add the contact form? Can anyone help me please.
Thanks so much,
November 22nd, 2009 at 11:52 am
Hi, thanks for the great write up, this is amazing. My only issue and it’s barely an issue is that when I did this on my home computer, the email sent just fine and it showed the email coming from the email I put in the box. But when I do it at work, the comes through as “unknown sender.” Does that have to do with our hosts (home is comcast, work is qwest).
Thanks!
November 24th, 2009 at 8:37 am
The tutorial worked great. Thanks so much.
From this foundation I’ll be able to make a more suitable form, but at least I know where to start.
Again, thanks.
November 24th, 2009 at 10:40 pm
Thanks for the tutorial
Have followed th instructions however when i submit it redirects to my server ?
What can i do
November 24th, 2009 at 11:03 pm
Sorted Changed the Enctype to: multipart/form-data
this works perfect
November 25th, 2009 at 8:55 am
everything works but i am not receiving any emails?
November 30th, 2009 at 5:15 pm
Thanks so much! You saved me a ton of time and it works perfectly. I don’t even get how it works, but it does. Amazing.
December 2nd, 2009 at 5:05 am
Thank you so much!!!! I finally got my form to work
December 3rd, 2009 at 5:24 am
When I fill out the form on my site, I get the following error message:
Warning: mail() [function.mail]: SMTP server response: 554 The message was rejected because it contains prohibited virus or spam content in D:\Hosting\5283546\html\FormToEmail.php on line 116
Here is the site: http://www.napleswaterfronthistory.com
What do i do?
December 5th, 2009 at 10:33 am
Followed your tutorial, it worked like a charm, thanks so much.
I wondered if there is any way to automatically send a copy of the form information to the sender as well as to me?
Thanks for your time.
Simon.
December 5th, 2009 at 9:26 pm
This is the error i get when i hit the submit button. Dont really know anything about php. also dont understand why its accessing something in the c drive… Please help me.
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay in C:\Inetpub\corewebmedia\FormToEmail.php on line 116
December 11th, 2009 at 5:02 pm
Can somebody help me please??? I cant seem to figure out what I’m doing wrong.
When I click Submit, this is what I get:
The website cannot display the page
HTTP 405
Most likely cause:•The website has a programming error.
More information
This error (HTTP 405 Method Not Allowed) means that Internet Explorer was able to connect to the website, but the site has a programming error.
For more information about HTTP errors, see Help.
December 19th, 2009 at 9:50 am
Just a heads up. GoDaddy is no longer using the gdform.asp, you would have to use ../_gdForm/webformmailer.asp
Also, if you are hosting with windows you need to use the .asp file, with linux the .php file
GoDaddy has a tutorial for both, but does not indicate the ../ before the _gdForm/webformmailer.asp, but you do need to use it otherwise you will get a File Not Found page.
December 23rd, 2009 at 3:47 am
I have a problem like some others. When I want to send the message it want’s me to download the file FormToEmail.php! Why is that and how can I correct that?
However, the tutorial is great! Many thanks Daniel!
December 24th, 2009 at 8:49 pm
thanks this great
I learned a lot from this contribution thanks again you are a god
December 24th, 2009 at 8:52 pm
my way works 100% great
December 24th, 2009 at 8:55 pm
My contact form is working
December 30th, 2009 at 3:55 pm
THANK YOU very much! I needed to create a simple contact for a friend’s web site and this did the trick AND fast! The only thing I had an issue with was that I followed your instructions ~exactly~ and had a little issue. In 5. above, you state to “…In the Action text box type in FormtoEmail.php…” The file I downloaded was FormToEmail.php (capital “T” in “to”). I couldn’t get the form to work until I realized the small mistake and fixed it in the Action box. Now it works like a charm!
January 14th, 2010 at 5:20 am
Hi, I have implemented this script but get no emails to my inbox. I have checked and double checked that all files have correct spelling and in the right locations, but still no email delivered. Any ideas?
January 14th, 2010 at 11:17 pm
I’ve just went through your tutorial and I have a problem, whenever I click the submit button with or without any text in any field I get a part of the php file printed and the Thank you, your message has been sent line.I’m a beginner so I might have done something wrong. The site is not up yet but wouldn’t it be normal to show something “normal” even offline?
January 16th, 2010 at 12:26 pm
When I click ’submit’ my page does nothing at all…?
January 27th, 2010 at 7:54 pm
Hi, Thank you for the tutorial. I did everything as you said. but when i click on submit it doesn’t actually send the email! could that be a web hosting issue? I got mine through yahoo..
February 1st, 2010 at 8:23 pm
Hello Guru, what entice you to post an article. This article was extremely interesting, especially since I was yearning for thoughts on this topic last Thursday.
February 9th, 2010 at 1:27 pm
Thank you! I have been under the impression that emailing through the website via dreamweaver would be very complicated. You made this so simple and my client is going to be a very happy camper!
Let me know if I can donate to the cause (i didn’t see anywhere) I’ll be happy to.
February 10th, 2010 at 1:40 am
I keep getting the “You Cannot send a blank form” message even though i populated my form with data from the start so that even if they left fields blank there was still something there. Please help I see this question several times in this post with no answer.
This is the page I’m working on
http://www.royaltyinn.com/mapdirections.html
February 10th, 2010 at 1:48 am
After posting I relooked at your tutorial and noticed that I had a value in the encrypt section. Once I removed that the form worked beautifully. THANK YOU!
February 15th, 2010 at 8:29 am
I am working on my dad’s website and trying to add this to his website, I have come across one problem and can’t seem to figure out what is wrong. He has made a template through a WYSIWYG and I replaced a line of code in his Contact Us Email submitter. The only trouble I have run into that I can’t seem to figure out is when I click submit after filling out the form I get this…http://www.dailyfitnessandexercise.com/FormToEmail.php(URL) It says: You cannot send a blank form.
How can I fix this?
February 16th, 2010 at 8:23 am
Very important:
Remove the line in the php file “”
and in your contact html page the form action line should read:
Also note that although the tutorial states that form action should be FormtoEmail.php, the capitalization is wrong. Make sure the “t” is uppecase.
February 16th, 2010 at 8:26 am
Odd that the meta line didn’t show. Remove everything after meta http-equiv in the php file.
February 16th, 2010 at 8:28 am
Sheesh. the form action line should read
form action=”FormToEmail.php” enctype=”multipart/form-data” method=”post”
February 16th, 2010 at 11:28 am
Has anybody else received this message? Please can you advise me on where i”m going wrong?
Error 403 - Forbidden
You tried to access a document for which you don’t have privileges.
February 17th, 2010 at 5:56 am
Thank you for the tutorial, worked! 1st time no promblems and was even able to editted the webpage more to my characteristics due to the easy notes you provided.
Thanks
February 18th, 2010 at 1:32 am
for yahoo users or for people having trouble when it sends but you don’t receive anything I figured it out.
In the FormToEmail.php page look for this code
$headers = “From: ” . $your_name . ” \n”;
either make it into a comment by adding this // at the beginning or just delete it all together.
February 19th, 2010 at 2:58 am
hello dan,
i followed the above instructions.. after several attempts of clicking submit button the page will display “Email address is invalid”
pls help thanks!
February 19th, 2010 at 12:41 pm
Genius
February 19th, 2010 at 2:43 pm
I am testing my website on my personal mac running the builot-in apache server. Is that why the mail doesn’t send?
February 20th, 2010 at 11:31 am
Hi, thanks for the tutorial. I used the FormToEmail.php file and it is working great and sending all the information on my form in an email as you said. I have tried to read the code but I can see where I can make a chnage but I would like for it to not put a blank line between each field it is printing out in the email. Below is an example of what it is doing.
Last Name: Fogg
First Name: Fred
Address: 123 Any Street
I would like for it to do this.
Last Name: Fogg
First Name: Fred
Address: 123 Any Street
Can you tell me what to change in the code to fix this?
Also, for some reason, it is taking some of the text fields and coverting them to all lower caps. Any idea why it is doing this?
Please email me back at NAFAWebMaster@n-a-f-a.com with your answers as I would love to get this fixed asap. These tutorials are great and have really helped me with our website. Thanks for the great tutorials.
Fred Fogg
NAFA Web Master (used loosely LOL)
http://www.n-a-f-a-.com
February 23rd, 2010 at 12:34 am
Great tutorial! I want all the fields on my form to be sent in the email, even if they don’t put anything in the field. With this code, it only sends the fields that have something in them. How can I fix this? Thanks!
February 23rd, 2010 at 2:23 am
Ok, I fixed it so it sends all the fields on my form, but it is putting a blank line in between each line in the email, what part of the build message code in the FormToEmail.php file do I change to make it not put a blank line between each field? Thanks!
If anyone knows, please post an answer here so I can fix this asap! Thanks!
February 23rd, 2010 at 4:44 am
I’m just tickled to have found this! Once I changed the case issue on the FormToEmail file, it worked like a charm. After running through some testing basics, the only thing I noticed was that I get the “Your message was sent” page even if I left the email address blank.
February 23rd, 2010 at 4:58 am
Those of you who want your submitter to receive a copy of the email, you can copy line 116:
mail($my_email,$subject,$message,$headers);
paste and edit so that the following is right below it:
mail($_REQUEST['email'],$subject,$message,$headers);
The $_REQUEST['email'] is the submitter’s email.