File Upload in PEAR and Smarty

For uploading files, you need to install a package of PEAR called ‘HTTP_Upload’ along with the installation of PEAR and Smarty. HTTP_Upload is used for easy and secure managment of files submitted via HTML forms. This package provides an advanced system for managing uploads of files via HTML input type “file” fields. Features include: 1) … Read more

Pagination in PEAR and Smarty

First of all, you need to install PEAR in your web server. Then you need to install Smarty. After that, you need to install a package in PEAR. It’s called ‘Pager’. Pager is a class to page an array of data. It is taken as input and it is paged according to various parameters. Pager … Read more

Using database in PEAR and Smarty

For using database, you need to install a package of PEAR called ‘MDB2’ along with the installation of PEAR and Smarty. MDB2 provides a common API for all support RDBMS. Connecting to database To instantiate a database object you have several methods available using MDB2. factory(): Will instantiate a new MDB2_Driver_Common instance, but will not … Read more