form validation library in php

Hi Geeks,

Today i am sharing a generic class for

Form validation library in php

& ┬áit also populate if form validation failed. First of all you can download the ‘form validation library in php’ by clicking on following url.

Now in this class you can validate the require,numeric,file-extension,match password & confirm password,validate url and other validation also.

It is having a validation with database like is_unique in mysql database where you need pass the db connection if you want to user is_unique validation.

Step 1: Include & Initialize the class in header or before your form s following:

Step 2: Create a HTML FORM

we are assuming that we have a form for add/edit ‘Advertise campaign’ form

Read the full comments in code


Step 3: Create a Table for advertise add/edit using following sql dump

Step 4: Now need to post the form and recieve data and show errors, Recieve post Before the HTML form

Please Comment If any problem in this. I’ll assist you to use this form validation library