Skip to main content
Participant
July 1, 2011
Question

after designing a form in dw how do you get the form to send an email from submit button?

  • July 1, 2011
  • 11 replies
  • 1614 views

i designed a form and it works up to the point of toggleing the submit button then nothing happens i do not receive any emails. please help me what am i doing wrong?

allen

This topic is closed to new replies. Start a new post to keep the conversation going.

11 replies

July 11, 2011

how do you get this thing to say that the question was answered by mr powers?

allen

July 2, 2011

Take a read here, this should get you started

http://www.paulgdesigns.com/learncontactform.php

Gary

David_Powers
Inspiring
July 2, 2011

garywpaul wrote:

http://www.paulgdesigns.com/learncontactform.php

Gary, although I'm sure you created that tutorial with the best possible intentions, it leaves users wide open to a well-known attack known a email header injection. For details see my blog post at http://foundationphp.com/blog/2010/12/31/preventing-email-header-injection/.

Also, you use the error suppression operator (@) when sending the mail. The operator should never be added to a script until it has been verified to be working correctly. Error messages are there to help diagnose problems. Hiding error messages automatically makes it impossible to troubleshoot the code when things go wrong.

July 2, 2011

David

Thank you for your comments, however if you read the entire page you will see that I address security and have a seperate page addressing that issue.  The last paragraph reads

**

A couple of other points, there is no validation on the form you see  here, so it opens the door to spam and other attacks. A submitter is not  required to input an email address and can input anything they like  with the form as written. There is no security on this form or script,  if you were to add a database to this script, it would be very  vulnerable to malicious attacks. It is strongly suggested you research  form security, in particular if you are adding a database

The link to the page is: http://www.paulgdesigns.com/secure.php

I would welcome your comments on it as well.

Your second comment, it would appear my proofreading skills are to blame, I typlcally don't use that when using mail();.

Thanks David.

Gary