The Administrative Side

The first script I’ll write will be for the purpose of adding products (specifically a print) to the database. The page will allow the administrator to select the artist by name or enter a new one, upload an image, and enter the details for the print (Figure 14.7). The image will be stored on the server, and the print’s record inserted into the database. But since this—and pretty much every script in this chapter—will require a connection to the MySQL database, I’ll write a connection script first.

Figure 14.7. The HTML form for adding prints to the catalog.

As I stated in the introduction to this ...

Get PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.