# Need help with a web form. Don't laugh, please

**URL:** https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042
**Category:** Factual Questions
**Created:** [May 1, 2009, 10:53pm UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042 "2009-05-01T22:53:27Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![MsRobyn](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MsRobyn](https://boards.straightdope.com/u/MsRobyn)
#### Post date: [May 1, 2009, 10:53pm UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/1 "2009-05-01T22:53:27Z")

</div>

I have a client who wants a form on her webpage that’ll end up in her e-mail inbox. I’m using Dreamweaver 8, and I know how to make the form, I just need to know how to get it to her inbox. Everything I’ve seen says there’s a script required, but I have no idea how to do that.

Any help is appreciated.

---

<div class="post-metadata">

### Author: ![DETXL](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/detxl/32/19366_2.png) [@DETXL](https://boards.straightdope.com/u/DETXL)
#### Post date: [May 1, 2009, 11:04pm UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/2 "2009-05-01T23:04:47Z")

</div>

How are you building the form? When I need to do that, I POST it to a PHP file that calls the [mail()](http://us.php.net/function.mail) function, as in

mail(“[example@example.com](mailto:example@example.com)”,“This is the message subject”,“This is the message text”);

There might be a way of doing that with scriping as well, but PHP has always worked for me.

Edit: [Two](http://www.thesitewizard.com/archive/feedbackphp.shtml) [tutorials](http://www.w3schools.com/PHP/php_mail.asp) on the mail() function:

---

<div class="post-metadata">

### Author: ![MsRobyn](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MsRobyn](https://boards.straightdope.com/u/MsRobyn)
#### Post date: [May 1, 2009, 11:15pm UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/3 "2009-05-01T23:15:48Z")

</div>

I’m using HTML. I’m not a professional web designer; I’m doing this as a favor to someone. The simpler, the better.

---

<div class="post-metadata">

### Author: ![Cleophus](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Cleophus](https://boards.straightdope.com/u/Cleophus)
#### Post date: [May 2, 2009, 12:01am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/4 "2009-05-02T00:01:08Z")

</div>

There’s no way to do it with just HTML. You need PHP or some other scripting environment to do the task of creating and sending the e-mail.

---

<div class="post-metadata">

### Author: ![MsRobyn](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MsRobyn](https://boards.straightdope.com/u/MsRobyn)
#### Post date: [May 2, 2009, 12:02am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/5 "2009-05-02T00:02:29Z")

</div>

That’s what I’m afraid of.

---

<div class="post-metadata">

### Author: ![BrandonR](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@BrandonR](https://boards.straightdope.com/u/BrandonR)
#### Post date: [May 2, 2009, 12:03am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/6 "2009-05-02T00:03:11Z")

</div>

You can’t do it with straight HTML. HTML isn’t capable of interacting with email servers to send the form information to someone’s email. You must use PHP or ASP or another web technology. Furthermore, using PHP’s straight mail() function gets more complicated because hackers know how to mess with simple contact forms to do their spamming for them.

If you don’t want to learn PHP or ASP (and I don’t blame you if it’s just for a web contact form), I’d recommend using various sites that offer free contact forms online. Google turns up a bunch of promising ones: [web contact forms - Google Search](http://www.google.com/search?q=web+contact+forms)

---

<div class="post-metadata">

### Author: ![Gfactor](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gfactor](https://boards.straightdope.com/u/Gfactor)
#### Post date: [May 2, 2009, 12:17am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/7 "2009-05-02T00:17:21Z")

</div>

Am I missing something?

> **[How to create a form and make it email its content to your mailbox](http://www.chami.com/tips/internet/010597I.html)**
>
> How to create a form and make it email its content to your mailbox

> **[HTML Tutorial - Forms](http://www.tizag.com/htmlT/forms.php)**
>
> An overview of each HTML form type with examples of code for each type of form.

I must be.

---

<div class="post-metadata">

### Author: ![dracoi](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dracoi](https://boards.straightdope.com/u/dracoi)
#### Post date: [May 2, 2009, 1:13am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/8 "2009-05-02T01:13:33Z")

</div>

You CAN do a form in straight HTML my making the FORM action a mailto: link. What you get is decipherable by mere humans, but it isn’t pretty.

There are a lot of forms available to process e-mail. Matt’s Script Archive’s FormMail is one of the oldest and I’m not sure if it’s still good.

I have a slightly more complicated question on this line for people who deal with this more often: how do you avoid getting spammed to death? The last time I turned on a form in my website, I was instantly getting 80+ spams from it per day.

---

<div class="post-metadata">

### Author: ![Nanoda](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@Nanoda](https://boards.straightdope.com/u/Nanoda)
#### Post date: [May 2, 2009, 2:23am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/9 "2009-05-02T02:23:57Z")

</div>

The main problem with the mailto form is that it requires that the user has their email client set up on that PC, and that they send it when it pops up. Anyone who just uses webmail, or is posting from a public PC, etc. etc., it won’t work for.

**dracoi** : That’s what [captchas](http://boards.straightdope.com/sdmb/showthread.php?t=514712) are for. 😉

---

<div class="post-metadata">

### Author: ![MsRobyn](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MsRobyn](https://boards.straightdope.com/u/MsRobyn)
#### Post date: [May 2, 2009, 2:26am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/10 "2009-05-02T02:26:20Z")

</div>

I found something that works for what I needed it for. The client is happy, and that’s all I want.

Thanks for the help, everyone.

---

<div class="post-metadata">

### Author: ![Category5](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@Category5](https://boards.straightdope.com/u/Category5)
#### Post date: [May 2, 2009, 2:31am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/11 "2009-05-02T02:31:18Z")

</div>

MailForm is a Perl script, you put it inside your cgi-bin folder on your web server. Not too complicated to install and use.

---

<div class="post-metadata">

### Author: ![Alex\_Dubinsky](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Alex\_Dubinsky](https://boards.straightdope.com/u/Alex_Dubinsky)
#### Post date: [May 2, 2009, 2:48am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/12 "2009-05-02T02:48:50Z")

</div>

> [@MsRobyn](#):
>
> I found something that works for what I needed it for. The client is happy, and that’s all I want.
> 
> Thanks for the help, everyone.

Thanks for the not telling us how, you.

---

<div class="post-metadata">

### Author: ![MsRobyn](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MsRobyn](https://boards.straightdope.com/u/MsRobyn)
#### Post date: [May 2, 2009, 2:52am UTC](https://boards.straightdope.com/t/need-help-with-a-web-form-dont-laugh-please/495042/13 "2009-05-02T02:52:12Z")

</div>

Sorry.

I went to the first link in the Google search that was linked to upthread. I had to tell it what I wanted the form to say, then I pasted the code. It works.
