IN THIS CHAPTER
• Introduction to PHP
• Basic Functions
• Handling HTML Forms
This chapter introduces you to the world of PHP programming, from the point of view of using it as a web scripting language and as a command-line tool. PHP originally stood for personal home page because it was a collection of Perl scripts designed to ease the creation of guest books, message boards, and other interactive scripts commonly found on home pages. However, since those early days, it has received two major updates (PHP 3 and PHP 4), plus a substantial revision in PHP 5, which is the version bundled with Ubuntu.
Part of the success of PHP has been its powerful integration with databasesits earliest uses nearly always took advantage of a database back end. In PHP 5, however, two big new data storage mechanisms were introduced: SQLite, which is a powerful and local database system, and SimpleXML, which is an application programming interface (API) designed to make XML parsing and querying easy. As you will see over time, the PHP developers did a great job: Both SQLite and SimpleXML are easy to learn and use.
Many packages for PHP are available through synaptic. The basic package is just called php5, but you might also want to add extensions such as php5-ldap, php5-mysql, or php5-pgsql. Choose only the extensions you plan to use; otherwise, it will waste system resources.
Was this article helpful?