Server Side Web Development for ECommerce

PHP and MySQL Approach



Dale R. "Zai" Fox



Office Hours:

2:00 - 2:50 PM Monday, Wednesday
5:30 - 6:30 PM Wednesday, Thursday
or by appointment





none in print

Important References: Ullman, PHP and MySQl for Dynamic Websites, Peachpit Press, 2003.

Lerdorf and Tatroe, Programming PHP, O'Reilly, 2002.

Lerdorf, PHP Pocket Reference, O'Reilly, 2003.


The grade will be based on homework, since it is safe to assume the homework is quite involved and people will prevent freeloading.

  • There will be four homework assignments each worth 25% of your grade.  You are expected to talk to each other when developing homework solutions, though each of you needs to turn in their own results.  

As usual, homework that is turned in late within 24 hours after the due date will receive an automatic 5 point deduction.  Homework that is late more than a day, but received within 3 days will receive an automatic 10 point deduction.  Homework that is more than three days late but less than a week late will receive an automatic 15 point deduction.  Any homework turned in more than a week late will receive an automatic 25 point deduction.

It is usually best to make sure you turn in what is working correctly on time and take the time necessary to get the other parts working before you turn them in.  You will get point deductions proportionate to the parts of the homework you turn in late.


The course is based on the assumption that you have some background in HTML or development of relatively static "information" pages for the web.  If you can develop your own personal web in HTML or FrontPage or some similar package you should have more than enough experience.  Though you are likely to learn much more about the meaning of HTML tags than you currently know.   If you don't currently have these capabilities it should be  relatively easy to compensate.

We are almost surely going to use Macromedia/Allaire Homesite or DreamWeaver as the basis of our PHP development.  Though you can choose another product if you want.

Any background in SQL or  will be helpful.  Almost nothing will be assumed about any such background. 

Description: This course will present a discussion of the major strategies involved in web development and their concomitant approaches to ecommerce processing.  Then we will focus on  PHP approaches for implementing a functioning organization website.  We will spend little time developing web page interfaces in class since some background is required.   Then we will start working with MySQL databases and start developing our template.

The primary focus will be on developing HTML for interface development viewed through browsers, PHP as middleware between the client and server and using MySQL for database operations on the server.

The template we are building is based off of a relatively high-volume design mimicking some that are used at large corporations.  While I won't be implementing the stored procedures that would improve its speed during this semester, such an upgrade shouldn't be very difficult.  We will discuss this more in class.

Required Software: For this course, most of the processing  will be enacted by a web server.  Thus you need to have a web browser, preferably Netscape or Internet Explorer, in order to interact with the server.  The HTML, PHP and MySQL that we will use will all be executed by the server. 

You need to register a domain and point the nameservers to

This is where we will be hosting the web and the MySQL.  We will go over this more in class.

Ultimately, the entire course could be developed from Notepad.  But you will need some way to upload your files to the web.  Some sort of FTP program is best.  I use GlobalScape's CuteFTP.  It cost about $40.   There are many others, for example WS_FTP available at, many of which are free.  Internet Explorer can also be used to FTP files and how this can be done will be demonstrated in class.

Finally, there are a number of development environments that can be used for scripting and page development.  I used to think that Macromedia/Allaire's HomeSite was the best.  But it seems that their new DreamWeaver MX constains all of the old HomeSite functionality and much more.




Weekly Topic Coverage


Week 1

Configuring Your Domain and Hosting

Some Background
Some Remote - Local - User Processing Issues
Some Database Issues
The QUESBMI Faculty Interest Database Management System

Some General Web Database Issues
What is PHP?

Week 2

Our First PHP Example - Hello World!
Characteristics of the PHP Installation on the Server
Variables and Constants
Quotation Marks

Some Form Processing
A Bit About Form Processing

Week 3

Some Built In Functions
Built In Functions for Numbers
Built In Functions for Strings
Built In Functions for Dates and Times

Decision Statements and Loops
Decision Statements

Homework 1

Week 4

Numerically Indexed Arrays
Associative Arrays

Input Validation
Input Validation

User Defined Functions
User Defined Functions
Another User Defined Function

Week 5

Sticky Forms
Sticky Forms
A Sticky Form with All the Form Controls

Session Variables
Using Session Variables to Compare Times
Session Login Security

Homework 2

Week 6

Some PHP and MySQL Background
Some Background on MySQL

Developing the Web Store - Some Analysis and Design
Some Background on the Business
Some Background on the Shopper's Experience
Some Background on the Database Tables

Browsing/Searching Products and Departments
Creating the Product and Department Tables
Using the MySQL Admin Interface
Initializing the Product and Department Tables

Week 7

Features Common to these Webpages
The Firefox Index Page
Displaying the Departments
Displaying the Products in Each Department
Displaying Each of the Products
Searching the Site

Week 8

The Shopper's Profile
Creating the Profile Table
Shopper Access to their Profile
Shopper Creating their Profile
Shopper Updating their Profile

EMailing the Shopper Their Password

Week 9

The Shopping Basket
Designing the Shopping Basket
Creating the Tables for the Shopping Basket

Adding Items to a Shopping Basket
Displaying the Shopping Basket
Deleting Items from a Shopping Basket
Updating Quantities in a Shopping Basket

Week 10

Check Out
Designing the Checkout Processes
Creating the Order_Data, Shipping and Tax Tables
Accessing or Creating a Profile During Checkout
Displaying the Billing Information
Modifying the Shipping Information for this Order

Completing the Process

Homework 3

Week 11

The Store Management Interface
Store Manager Background and Overall Design



Week 12


Week 13


Week 14






Return to Dale R. "Zy" Fox's Courses Page

Return to Dale R. "Zy" Fox's Home Page