PDA

View Full Version : Email validation not working with



mmcshelly4
03-10-2008, 05:10 PM
1) Script Title: Required field(s) validation

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/requiredcheck.htm

3) Describe problem: I added this code to a form on our site. For the most part, it works great, except that the email field doesn't require a valid email address. A user can put anything in the email field and submit it as long something is there. (i.e. They could put "test" in the email field and submit the form instead of having to put a valid email address such as "test@server.com".)

When I added the "Email Validation Script" from DD (http://www.dynamicdrive.com/dynamicindex16/emailvalidate.htm) it remedied the issue mentioned above. (Users did have to enter a valid email address instead of just entering any old text in the email field.) However, when the form was submitted and I received it in my inbox, it said the email was from some weird email address generated by our host (not the email address that the user put in the email field).

So even if I enter a valid email address in the email field (i.e. test@server.com), when I receive the submitted form in my inbox, it says it's from nobody@ninja.sd.dreamhost.com.

Here's an example of what the submitted form looks like without the email validation script:

Below is the result of your feedback form. It was submitted by
(test@server.com) on Monday, March 10, 2008 at 12:41:55
---------------------------------------------------------------------------
NOTES: Thank you for submitting an announcement request. You may print this page for your records.
name: test
start date: test
last date: test
slide: test
bulletin: test
headline/title: test
full text: test
additional information: test
---------------------------------------------------------------------------

Here's an example of what the submitted form looks like when using the email validation script:

Below is the result of your feedback form. It was submitted by
() on Monday, March 10, 2008 at 12:41:55
---------------------------------------------------------------------------
NOTES: Thank you for submitting an announcement request. You may print this page for your records.
name: test
start date: test
last date: test
slide: test
bulletin: test
headline/title: test
full text: test
additional information: test
---------------------------------------------------------------------------

Any help would be appreciated. Thanks for provided such helpful info for those of us who are far from being experts :)