Email Form Field

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
Title says most of it. Right now I have a direct email link as a "Contact Us" on my web site. I would like to make a form field where the sender enters their information and it gets sent to us. I have searched it and found literally thousands of ways of doing it. I'm not good with CGI and only know HTML and some CSS. So what is the best and easiest way to go about doing this?
 

bluestrobe

Platinum Member
Aug 15, 2004
2,033
1
0
I found some nice forms off this web site:

http://www.thewebhelp.com/php/...with_image_validation/

So I tested it and found that anyone can enter anything in the email address field and send it. The web site has a problem with people just sending in junk stuff and this gives us no way to track them. Is there a form like that that has some type of email address type of verification?
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
The easy way, from the other thread:

Use "mailto:address@mydomain.com" as the form action, explained here

mailto = from the user's email program and their mail server
script = from the web server's mail server

No one will try to hijack your mail server for spam using a mailto: link, since they would be using their own mail server.


The other approach is to validate the fields with server-side script code to reject the form submit if:
1. bad stuff found: web links, junk emails, porn/drug words, etc.
2. good stuff not found: check that a number field has good numbers, a street address has a normal range of words (2-10?), etc.

Also, the desination email address should be hard-wired into the server script code that processes the form, it should not be something easy to hack like a hidden form variable.