Bluehost: Web hosting from $3.95/month. Sign Up

Form validation with PHP. Help!

Posted on by Clive Walker in Web Development PHP

I was recoding a form the other day and I needed a different form validation method (using PHP). We all know that JavaScript validation provides a neat user experience but it doesn't work if someone wants to circumvent it or has JavaScript turned off for another reason. That's why server-side validation is important. In my case, I've used a variety of different methods but I wanted to write something new that could be developed further and that was suited to my requirements rather than something off-the-shelf.

After hunting round on the web and browsing my own library of methods, I realised that I didn't know quite as much about this as I thought. After several hours beating myself up (metaphorically speaking), I remembered this PHP User System Form Validation video tutorial from Think Vitamin. It's an excellent tutorial that provides a useful starting point for validating forms with PHP.

Anyway, the tutorial helped me recode my particular form. Great work from the presenter Jim Hoskins and the Think Vitamin guys and gals!

Update August 2012: The link above is no longer there and there's no replacement AFAIK

Leave a comment

A simple question that helps prevent automated form fillers.

© 2016 Clive Walker