View Full Version : Form Validation Not Working

07-18-2007, 07:35 PM
I have a form that I want to prevent people from spamming with missing fields, as the information gathered by the form is inserted into a database using PHP, and it is a pain in the butt deleting all the empty entries every day.

The form only has three text boxes. How can I add validation to them using JavaScript, preventing people spamming the hell out of my poor databases?

07-18-2007, 07:42 PM
We would need to see the form and your attempt at coding the validation. No one is going to code it for you. We can help you with it though. Furthermore you would still need to validate the form server side just in case js is disabled.

07-18-2007, 10:37 PM
The best solution is to use server-side validation as javascript can be easily disabled. You must also code against sql injection attack (http://www.google.com/search?hl=en&q=sql+injection+attack).