Does your site run on Perch CMS? Hire me to help. Perch CMS Development

Form validation with PHP. Help!

Posted on by Clive Walker in Web Development PHP

I wrote this post a while back. The content can still be relevant but the information I've linked to may not be available.

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

Does your site run on Perch CMS? Hire me to help. Perch CMS Development
Leave a comment

A simple question that helps prevent automated form fillers.

© 2020 Clive Walker