If you have made up your mind to take advantage of the capabilities that the PHP/Oracle combination provides, the first obvious step is to make sure that you have PHP and Oracle database software installed and working properly. This chapter in conjunction with Appendix A Installing PHP and Oracle Software takes you through the basics of getting your PHP/Oracle development environment installed and configured. You learned that making PHP work with Oracle database is in fact a piece of cake, especially if you employ Zend Core for Oracle—a package that includes all the client libraries needed to work with Oracle from a PHP environment.
Every PHP/Oracle application does at least two things: connecting to the database and executing an SQL statement or statements against it. For example, imagine an application that collects user input and then executes an SQL pass-through query to send the data to the database. In practice, however, you normally need to create an application that takes care of two more things: fetching the retrieved data from the database and displaying it to the user. The example discussed in this chapter contains each of the steps mentioned above. Specifically, it shows you how to: connect to the database, issue a query against it, and then fetch and display the results to the user.
This is a common set of operations, which almost every lightweight PHP front-end application has to deal with.
Now that you've got a basic understanding of how a PHP/Oracle application works, it's time to move on to more advanced uses. The next chapter deals with some of the most interesting aspects of PHP/Oracle application development and deployment.