PHPJavascript

Web Development Guide – My Personal Library of Tutorials and Scripts

Build PHP Database Driven Websites – Tutorial 1 (Database Structure)

August25

PHPJavascript is all about building dynamic websites. Till now I along with my team have added free scripts, answered forums, given tips and have talked about a no of issues relevant to web development.

But now I am going to build a basic and simple “E-commerce Website” with you. As developing a site take days, I will divide this whole procedure in stages or “Episodes”.

Lets start our episode1 by checking if all the required web development tools are installed on our local PC.

PHP (click here to install PHP)

IIS or apache (click here to install IIS)

MYSQL (click here to install MYSQL)

PHPmyadmin or SQLAdministrator (click here to install PHPmyadmin)

I assume that is done…

A dynamic website has three main parts:

  • Database: To store data
  • Website (itself): To view data
  • CMS (Content Management Software): To administer data

Database

We will need the 4 following tables

Table 1 – product: to store the products

Field Type
int(25)
varchar(255)
varchar(255)
text
ddesc text

Table 2 – productcategory: to store category of the products

Field Type
int(11)
int(11)

Table 3 – category: to store category

Field Type
char()
varchar(100)

Table 4 – adminuser: to store admin user for the CMS

Field Type
sno varchar(50)
varchar(50)
password varchar(50)

Start phpmyadmin

Open Internet explorer – type – http://localhost/phpmyadmin

Create the above four tables by using phpmyadmin user interface or click on “SQL”, download the file from this webpage and copy paste the code in it

Note: The mysql code is attached with this webpage. Please download it from the top of the page. It contains table structure plus data while above we have only mentioned the structure.

posted under Development Guide

Email will not be published

Website example

Your Comment:

 

3,048 spam comments
blocked by
Akismet