I want to add a simple php script to my contact webpage. So that i can receive feedback in my email.It only has three fields for name,Email Address and comment. I want it to validate with both php and javascript and then send me the information accordingly. I have been searching the web for ideas but unfortunately most solutions are full of errors and others are just unnecessarily complicated. Can anyone point me to a simple solution which i can immediately implement on a live site? Or even show me how to do it correctly.
1 Answer
If you want to validate your form using javascript I suggest you take a look at jQuery Validate
It's really easy to implement and looking as the sources of the demo's should get you started. As for php most of the time you only validate the email and make sure the name fields don't get too long: