<------------------------------phpshopcart------------------------------------>
Shopping Cart Application Documentation
By Jamie Becker
Copyright (C) 2000, Jamie Becker

LICENSE INFORMATION

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA  02111-1307, USA.

Please see www.gnu.org or www.fsf.org for the full text of the license.

DESCRIPTION

This program is a shopping cart application detailed in the book, "The DBA's Guide to Red Hat Linux". It is designed to be a flexible and easy to learn demonstration of how to program using PHP3 and MySQL.

This program was developed on SuSE Linux 6.3, but the installation principles,
if not the actual steps, should be similar on other platforms.

This application is designed to work from a hosted installation. If you need a
hosting provider, I use Hurricane Electric (www.he.net) and am very happy with
them. They offer a MySQL database and PHP, with 5 MB of space, for $9.95/mo.
(Currently). I do not work with or know anyone from HE, nor do I receive
anything from them for saying this. I just like their service. If you use a host
provider, you will want to delete the CREATE DATABASE shopcart statement from
the shopcart.sql and change the USE DATABASE statement to match the database
name given to you by your provider. You will also want to change your database
name inside of the index.php3 file.

INSTALLATION

The included shopcart.sql dump file will create the structure of the shopping
cart database for you, without any data. It includes a command to create and use
the shopcart database, and then creates six tables within that database.

Use a MySQL administration program to import the SQL file (shopcart.sql); for
example, I use phpMyAdmin (http://phpwizard.net/phpMyAdmin/). You could also
use:

mysql -ppassword < shopcart.sql

After you have created the database, you need to actually install the
application itself. Although I have avoided including any graphics in the
application, I did need to use a single transparent 1x1 pixel gif.

To install the application, install the index.php3 and the img/ folder (and its
contents) somewhere in your web server directories.

Once you've copied the files, you simply navigate to the folder containing the
index.php3 file from your web browser. If all goes well, you should see the
main shopcart page.

If you see <?PHP ... etc, your PHP installation is not working properly.

If you see Error 404 Document Not Found or something similar, you need to create
an index file that redirects the browser to the correct PHP3 page. It's also
possible that you just made a typo someplace or you're not navigating to the
correct directory. Double check and make sure that you're going to the right
place and that the file index.php3 is actually there. Your provider's Apache (or
other web server)installation may not support index.php3 as an index filename.
If you are not able to do this, I recommend you create a normal index.html or
default.htm file that redirects the user to the correct page. Contact me if you
need help doing this.

MODIFYING THE APPLICATION

Since the entire application is located within one file, it should be very easy
to make changes without getting lost. If you make any really great mods, please
send them back to me and I'll include them in future versions.

CONTACTING THE AUTHOR

You may contact the author at: jamiebecker@symetix.com
Jamie Becker 4 Fox Hollow Road Cortland, NY 13045
