The Product Catalog

For customers to be able to purchase products, they’ll need to view them first. To this end, I’ll create two scripts for accessing the product catalog. The first, browse_prints.php, will display a list of the available prints. If a particular artist has been selected, only that artist’s work will be shown; otherwise, every print will be listed.

The second script, view_print.php, will be used to display the information for a single print, including the image. On this page customers will find an Add to Cart link, so that the print may be added to the shopping cart.

To make browse_prints.php:

1.
Create a new PHP document in your text editor (see Script 13.6 on the following page).
 <?php # Script 13.6 - browse_prints.php $page_title ...

Get PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide 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.