g
Printer Friendly Version

editor  
BellaOnline's PHP Editor
 

Introduction To Ecommerce Using PHP and MySQL

PHP and MySQL are a good combination for creating an ecommerce solution for your website. However, creating any complicated application such as this can seem overwhelming at first. The secret is to think of the application as a group of smaller PHP programs or scripts that work together, along with your MySQL database, to run the ecommerce section of your website. It is much less overwhelming when you break the application down into the individual components.

MySQL Databases
You will need the MySQL database application installed on your web server. MySQL is very popular and you should have no problem finding a web host that offers MySQL. Most web host also offer a user interface application such as PHPMyAdmin for working with MySQL databases. A database consists of a series of tables that store information needed by your ecommerce application. For example the table below stores the first name, last name, username and password for two fictitious people.

First NameLast NameUsernamePassword
Mary
Jane
Lamb
Smith
MLamb
JSmith
B11111
A00B00

The number of databases and database tables that you will need depends on the complexity of your ecommerce application. So let's discuss a few basic components.

Customer Database
The first database you will need will hold the information about your customers. You will want to store information about each customer such as a unique customer ID, customer account ID, username, password, first and last name, mailing address, billing address, email address, credit card number, credit card expiration, etc.

Product Database
The next database you will need is your product database which will store the information about each product in your online catalog. Again, how you set up your database tables will depend upon the complexity of your catalog. Basically you will store information such as the product's unique ID, name, description, price, and the product's category (Software, CDs, and Books).

Cart Database
You will need a database to store information about each customer's shopping cart as your customer adds or deletes items from his cart.

Order Database
You will need to keep an order history of completed orders. This database should include information such as the unique order ID, order date, fulfillment date, shipping date, items ordered, etc.

Next →




This site needs an editor - click to learn more!

PHP Site @ BellaOnline
View This Article in Regular Layout

Content copyright © 2013 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Editor Wanted for details.



| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2023 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor