You are on page 1of 14

E-COMMERCE WEBSITE-

S U P E R M A RT
2

CONTENTS
o E-R DIAGRAM

o DATABASE

o CODE OF DATABASE

o PHP
E-R DIAGRAM
 id is the primary key  Id is the primary key.
 User_id is the foreign key
 Name, email,
referencing id in the users
password, and table
user_type are the  Name , number , email ,
attributes method , address ,
total_product , tatal_price ,
placed_on , and
 Id is the primary key. payment_status are the
 Name , price , and attributes
image are the
attributes.

 Id is the primary key.


 User_id is the foreign key
referencing id in the
users table.
 Name , price , quantity,
 And image are the
attributes.
5
F L O W O F D ATA & TA B L E
LINKAGE

1. User Registration: A new user registers on the platform.


Their details are stored in the users table.
2. Browsing Products: The user browses products. Product
details are fetched from the products table.
3. Adding to Cart: When the user adds a product to their
cart, a new entry is created in the cart table. This entry
is linked to the user’s ID
4. Placing Orders: When the user decides to place an
order, an entry is created in the orders table. This entry
contains the user’s ID, the details of the order
6
S Q L C O D E O F D ATA B A S E
PHP OF REGISTER
FORM
REGISTER FORM
P H P O F L O G I N PA G E
L O G I N PA G E
P H P O F H O M E PA G E
H O M E PA G E
H O M E PA G E
THANK YOU

You might also like