Send Web Form via e-mail

TimTDP

Expert Member
Joined
Feb 23, 2007
Messages
1,228
Reaction score
131
Location
Under the slopes of Table Mountain
I need to put together a form with numerous input fields. I need to validate that some fields have an entry, eg. e-mail address.
I then have a submit button
When the user clicks the submit button the contents of the fields need to be sent to an e-mail address.

how do I do this?
 
Hey,

This is pretty simple, using php and javascript. You would have a form that posts to a php form mailer. You can do the form field validation using javascript as the user enters the data or via php when posting. Javascript would probably be easiest and more user friendly.

There are various guides available with regards to form validation try google "php form validation". You can also have a look here with regards to the usage of the php mail() function - http://www.php.net/manual/en/function.mail.php.
 
Last edited:
I need to put together a form with numerous input fields. I need to validate that some fields have an entry, eg. e-mail address.
I then have a submit button
When the user clicks the submit button the contents of the fields need to be sent to an e-mail address.

how do I do this?

I'm going to tell you the same thing I tell me Junior's. Details Details Details.

You have enough detail but most people doesn't know you from a bar of soap so they don't know on which technology you're trying to do this one. What your restrictions are etc. So the assumption was made about PHP. (Which is awesome btw... I'm starting to see the light!)

So remember next time to try and tell us what technology you're working on. :D
 
Agreed with JasonH.

Use JavaScript for your validation. Very simple and extremely user friendly. Then when your form passes all the requirements, send it off to your PHP script to e-mail it.

Shout if you need examples or help doing this. Google is by far your best friend :D
 
Top
Sign up to the MyBroadband newsletter
X