Chapter 14. ExampleE-Commerce


In this, the final chapter of the book, I'll develop one last Web application, an e-commerce site. Despite the recent economic slump and the devaluation of Web sites, e-commerce still plays a vital role on the Internet and is a prominent use of PHP and MyBSQL.

In this example, I'll design a site for the purpose of selling prints of art. Unfortunately, to write and explain the entire application would require a book in itself. Furthermore, some aspects of e-commercelike how you handle the moneyare extremely particular to each individual site. Trying to demonstrate such a process would be a waste of space. With these restrictions in mind, the focus in this chapter is on the core functionality of an e-commerce site: populating a catalog as an administrator, displaying products to the public, creating a shopping cart, and storing orders in a database.

From a technological standpoint, this application will use the Improved MySQL Extension functions, which require that you are using PHP 5 with MySQL 4.1.3 or later. These functions were introduced in Chapter 11, "Extended Topics," but haven't otherwise been fully used to this point. If the server you are using does not meet these requirements, you will need to make the necessary modifications to the PHP scripts. For the most part, this is a matter of replacing mysqli_something() with mysql_something(), as well as making minor modifications to the order of the function's arguments. Throughout this chapter I will repeatedly add reminders as to what changes will be required if you are using the older software.



    PHP and MySQL for Dynamic Web Sites. Visual QuickPro Guide
    PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    ISBN: 0321336577
    EAN: 2147483647
    Year: 2005
    Pages: 166
    Authors: Larry Ullman

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net