Showing posts with label php classes. Show all posts
Showing posts with label php classes. Show all posts

Thursday, November 8, 2007

Form Validation with PHP

Validating forms in PHP


Using validation class from PEAR http://pear.php.net/package/Validate, it's very easy to validate forms. Forms validation is neede in order to protect your website from xss injection, sql injection, email injection. For example if you are expecting an email address in a field, you should validate that field for an email address.

This class validation from PEAR has the following validation methods:
  • number
  • email
  • date
  • string
  • and more
All you have to do is download this validation class from PEAR, and you now can have a safe website by validationg user input. Open downloaded class, and you will see all the methods, with all the parameters required for each validation method.

How to validate form submission in PHP

Friday, October 12, 2007

Upload and image manipulation class

So you want to upload your files, but also validate extensions, size. You can use PEAR's HTTP_Upload class for that.

And then if you want to only upload images, and create thumbnails, resize images or crop the uploaded images, you can use the above upload class and this great Thumbnailer Class

This two classes make a powerful tool for uploading ,validating, resizing, cropping, rotating images or pictures.

Saturday, October 6, 2007

PHP useful classes

Here is a list of PHP tools or classes I use to develop my projects.