PHP form validation

Hi,

Can anyone please point me to some tutorials that discuss practical ways to implement form validation with PHP. (purely based on PHP, not using JavaScript or other language)

Many thanks. :slight_smile:

If you’re goign to be validate email you should stick to

filter_var(‘bob@example.com’, FILTER_VALIDATE_EMAIL);

You should probably read this, too. But be sure to read my comment at the end regarding version 17.

If you are using PEAR package then below would surely gives you an idea…

http://pear.php.net/package/HTML_QuickForm/docs

Hi,

Check this url, it describes a way to implement validations using both javascript and php:

http://www.php-mysql-tutorial.com/wikis/php-tutorial/form-validation-using-php.aspx

Kul