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. Because the print’s image is stored outside of the Web root directory, view_print.php will use a separate script—very similar to download_file.php from Chapter 12 ...
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.