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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.