Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

Online Book Store in PHP

Submitted by
Pratim Jana

Registration no-161541810014
Roll no-15499016016
MASTER DEGREE THESIS
A thesis submitted in partial fulfillment of the requirements
for the degree of MSC
In
Computer Science

Under Supervision
Subhajit Pal

Dinabandhu Andrews Institute of Technology and


Management
MaulanaAbulKalam Azad University of Technology
11th MAY, 2018
Acknowledgement

I take this opportunity to express my deep gratitude and sincerest


thank to my project mentor, Subhajit Pal for giving most valuable
suggestion, helpful guidance and encouragement in the execution of
this project work.

I will like to give a special mention to my colleagues. Last but not the
least I am grateful to all the faculty members of college their support.
To whom at may concern

This is certified that the work entitled as


‘Online book store in PHP’
has been satisfactory complete by Pratim Jana(Registration no-
161541810014OF 2016-2017 Roll no-15499016016).It is a bonafide work
carried out under my supervision at DAITM Kolkata for partial fulfillment of
Msc in computer science during the academic year 2016-2018.

Project Guide
Subhajit Pal
Assistant professor
DAITM Kolkata

Forward by
Paramita Ray
HOD of Computer science Dept
DAITM Kolkata
CERTIFICATE AND APPROVAL

This is certified that the work entitled as has been satisfactory


complete by Pratim Jana (Registration no-161541810014 OF 2016-
2018Roll no-15499016016).It is a bonafide work carried out under
my supervision at DAITM Kolkata for partial fulfillment of Msc in
computer science during the academic year 2016-2018.It is
understood that by this approval the undersigned do not necessarily
endure or approve any statement made, opinion expressed or
conclusion drawn there in but approve for which it has been
submitted.

Examiners

Signature of the Project Guide Signature of the Head of the


Department

Signature of the examiner


DECLARATION OF ORIGINALITY AND COMPLIANCE
OF ACADEMIC ETHICS

I hereby declare that this thesis contents original project work done by
me, as part of master of computer science studies. All information in
this document has been obtained and presented in accordance with the
academic rules and ethical conduct.
I also declare that, as required by these rules and conduct I have fully
cited and referenced all the materials.

Pratim Jana
MSC (CS)
Registration no-161541810014
Roll no-15499016016
Table of Contents Page No

1. Abstract

2. Introduction and Objectives of the Project

3. Tools/Platform, Hardware and Software Requirement specifications

4. Goals of Implementation

5. SDLC Process Applied


6. Data Model
7. Functional Requirements (Use Case Diagram)
8. System Requirements
9. Feasibility Study
10. Project Planning
11. Project Scheduling
12. Software Engineering Paradigm applied
a. Data Flow Diagram (DFD)
13. Database design
14. User Interface Design
15. Coding
16. Testing
17. Future enhancement thoughts

18. Software Scope


19. Conclusion
20. Bibliography
1. Abstract

This project aims to develop a web application is for ONLINE BOOKSTORE. This is an

online book STORE where multiple users can view, select and purchase different
books.

This project, once implemented, will enable people to get access to an online book
store. The main objective of this application is to make it interactive and its ease
of use. It
would make searching, viewing and selection of a book easier. It contains a
sophisticated search engine for users to search for products specific to their needs.
The search engine
provides an easy and convenient way to search for books, where a user can Search
for a
product interactively and the search engine would refine the different books
available
based on the user's input.

The user can then view the complete specification of each book. The main
emphasis lies
in providing a user friendly search engine for effectively showing the desired
results.

2. Introduction and Objectives of the Project

2.1 Project Title

Online Bookstore.

2.2 Purpose
The main objective of this application is to make it interactive and its ease of use.
It would make searching, viewing and selection of a book easier. Electronics can, in
principle, be an answer..

Online Bookstore is used for the following purposes:

To be able for automation of Bookstore.

To reduce the workload of staffs.


To get faster retrieval of information about the desired book.

To provide facility to reduce paper work and provide data security.

2.3 System Scope

The Online Book Store is a web based application intended for online retailers.

Scope of this document is to satisfy the requirements, clearly identifying the


information
needed by the user, the source of the information and outputs expected from
the
system.

3. Tools/Platform, Hardware and Software Requirement specifications.

Tools

Dreamweaver CS6

XAMPP

MySQL
Platform
Microsoft Windows 10
Hardware Requirement Specification

Client Machine Server Machine


HDD 200 MB HDD 320 GB
Processor Pentium 4 or newer Processor Dual Core or newer
processor that processor
supports SSE2
Memory 512 MB Memory 2 GB

Software Requirement Specification

Client Machine Server Machine


Browser Any standard Software Apache
browser with
JavaScript
interpreter
Client side mark up / HTML, Javascript Database MySQL
scripting languages Management
System Software
Specification MySQL-5.6

4. Goals of Implementation

The implementation aims at seamless document sharing across the institution.

5. SDLC Process Applied


Often, a customer defines a set of general objectives for software but does not identify
detailed input, processing, or output requirements. In other cases, the developer may be
unsure of the efficiency of an algorithm, the adaptability of an operating system, or the form
that human/machine interaction should take. In these, and many other situations, a
prototyping paradigm may offer the best approach.

The prototyping paradigm begins with requirements gathering. Developer and customer
meet and define the overall objectives for the software, identify whatever requirements are
known, and outline areas where further definition is mandatory. A "quick design" then
occurs. The quick design focuses on a representation of those aspects of the software that
will be visible to the customer/user (e.g., input approaches and output formats). The quick
design leads to the construction of a prototype. The prototype is evaluated by the
customer/user and used to refine requirements for the software to be developed. Iteration
occurs as the prototype is tuned to satisfy the needs of the customer, while at the same
time enabling the developer to better understand what needs to be done.
Ideally, the prototype serves as a mechanism for identifying software requirements. If a
working prototype is built, the developer attempts to use existing program fragments or
applies tools (e.g., report generators, window managers) that enable working programs to
be generated quickly.

6. Data Model
ER Diagram
Pdf
downlo
ad

7. Functional Requirements

This section provides a high-level overview of Online Book Store.


7.1 Application Overview

Online Bookstore is a web application that is intended for automating a

Bookstore. The end user of this system is a customer who wants to buy a book.

The user can view the available books, select them and can make an order to
purchase it. The administrator can maintain the record of books purchased and
remaining.

7.2 Application Scope/ High Level Requirements


Online Bookstore has functions as described below. Register & Sign up

This module allows the user to register.


Login

Only registered user avails the facilities of this application. User needs to authenticate
with the system providing username and password.

Book Information Search

The user can view the available books on selecting the following

 Category Name(select)
 Author
 Title
Publisher
The user can select the book if the Quantity of the book is available. Every
book in the system should be identified by a unique book id.

Use Case Diagram

PDF
DOWNLOAD

8. System Requirements

8.1 System Interface


The software is to be developed in J2EE environment using JSP and JDBC.

8.2 User Interface

The client interacts with the system through a HTML/ JSP pages.

8.3 Communication Interface

The communication between the front-end and the back-end is through


JDBC.

8.4 Hardware Requirement Specification

Pentium Dual Core or above

2GB RAM or above

8.5 Software Requirement Specification

Windows 10

JDK 1.6.0 or above

Oracle 10G Express Editions,


Tomcat 7.22

Mozilla Firefox 3.0 and above

Google Chrome

XAMPP

9. Feasibility Study

Technical Feasibility

A study of function, performance, and constraints that may affect the ability to
achieve an acceptable system is the next important issue to be stored out. The
considerations that are normally associated with technical feasibility include
developmental risk,
resource availability, and technology.

Sun micro system JAVA Technology (JSP) & HTML as Front End and Oracle technology
(Oracle 10g) as Back End, has been chosen for the development of the project.
Oracle database provides the best option for development of the error free, and
secure
database development. As such a database in this system can grow to considerable
size so Oracle 10g is the best choice. Java technology has been chosen for the
front-end design due to its robustness and Object Oriented Features. As we know
HTML is very user friendly so it is best to choose for the front end.

So it is justified to say the Project is Technically Feasible.

Economical Feasibility

These feasibility checks whether the software development is completed at a cost


the software organization, its client and the market can afford.

Our project is economically feasible in the sense of doing programs using the
equipment (network facility, electricity) of our training institute. Those equipment’s are
available in free of cost with the guidance of our college’s sir and madam.

So it is justified to say the Project is Economically Feasible.

Operational Feasibility

This feasibility studies whether software is operationally feasible or not this has
been
developed in a very user friendly manner so that any person ring basic computer
knowledge can operate on this software. So project has the Operational
Feasibility.

Feasibility Study
Author: Pratim Jana Page: 1

Product
The project requires a web application to be developed that will allow online functioning of
T&P cell.
Technical Feasibility
The web application will be developed using PHP and MySQL. The team is competent in
that.
Social Feasibility
Some training for the users/admin is required but all users are IT literate.
Market Research
Market research says that this application would be useful for the users as it could
seamlessly help them to share documents.
Economic Feasibility
The application can be developed within budget.
Alternate Solution
Could be a desktop system but that would not allow documents to be shared online.

10. Project Planning

Project planning is concerned with identifying the following for every project:

 Activities
 Milestones
 Deliverables.

A plan must be drawn up to guide the development towards the project goal. A plan is
drawn up at the start of a project. This plan should be used as the driver for the project. The
initial plan is not static, and must be modified as the project progresses.

Planning is required for development activities from specification through to delivery of the
system.

12. Software Engineering Paradigm Applied


Data Flow Diagrams
Level 1 DFD (Administrator)

13. Schema/Database Design


14. User Interface Design:snap shots

Home page
Registration Page
Login to continue

User profile

Search book
Download book info(PDF)

Admin Panel
Upload Book

15. Coding: 1 page


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
<link rel="stylesheet" type="text/css" href="css/index.css" />
<script type="text/javascript" src="js/index.js">
</script>
</head>

<body onLoad="slide()">
<?php include("header.php"); ?>
<div id="divback" style="background-image:url(Images/1st.jpg);">
<imgsrc="" id="div"/>
</div>
<div style="backround-color:#93C; float:right; width:420px;
margin:20px;">
<h3>Deciding what to read next?</h3>
You’re in the right place. Tell us what titles or genres you’ve enjoyed in
the past, and we’ll give you surprisingly insightful recommendations.
<h3>What are your friends reading?</h3>
Chances are your friends are discussing their favorite (and least favorite)
books on Good reads. Want to learn more? Take the tour.
</div>
<table width="100%" align="center" style="background-color:#333;
padding:0px;" cellpadding="0" cellspacing="0">
<tr>
<td width="20%"><imgsrc="Images/Good-womens.jpg" class="book-
pic"/></td>
<td>
<table style="color:#FFF; width:89%; padding:0px;">
<tr>
<td><h3>Good Omens: The Nice and Accurate Prophecies of Agnes
Nutter, Witch</h3></td>
</tr>
<tr>
<td class="author">By Terry Pritchett, Neil Gaiman (Good reads
Author)</td>
</tr>
<tr>
<td style="color:#fff; text-shadow:2px 2px #000;">According to The
Nice and Accurate Prophecies of Agnes Nutter, Witch (the world's only
completely accurate book of prophecies, written in 1655, before she
exploded), the world will end on a Saturday. Next Saturday, in fact. Just
before dinner.</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr><td class="newLine">&nbsp;</td></tr>
</table>
</td>
</tr>
</table>
<table width="100%" align="center" style="background-color:#333;
padding:0px;" cellpadding="0" cellspacing="0">
<tr>
<td width="20%"><imgsrc="Images/the-lady.jpg" class="book-
pic"/></td>
<td>
<table style="color:#FFF; width:89%; padding:0px;">
<tr>
<td><h3>The Lady Most Willing...: A Novel in Three Parts (Lady Most
#2)</h3></td>
</tr>
<tr>
<td class="author">by Julia Quinn (Goodreads Author), Eloisa James
(Goodreads Author), Connie Brockway (Goodreads Author)</td>
</tr>
<tr>
<td style="color:#fff; text-shadow:2px 2px #000;">Step into the
glittering world of Regency and prepare to have your hearts warmed by
Julia Quinn, Eloisa James and Connie Brockway...
</td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr><td class="newLine">&nbsp;</td></tr>
</table>
</td>
</tr>
</table>
<?php include('footer.php'); ?>
</body>
</html>

register_user
<?php
$con = mysqli_connect("localhost","root","");
if (!$con) {
die("Database connection failed: " . mysqli_connect_error());
}
mysqli_select_db($con,"bookstore") or die("cannot connect database");
$name = $_POST['name'];
$phone = $_POST['phone'];
$DOB = $_POST['day']+'-'+$_POST['month']+'-'+$_POST['year'];
$sex = $_POST['sex'];
$email = $_POST['email'];
$password = $_POST['password'];
$duplicate = mysqli_query($con,"select * from user where email =
'$email'") or die("Duplicate error");
while($row = mysqli_fetch_array($duplicate))
{
$dup = $row['user_id'];
echo $dup;
}
if(isset($dup))
{
header("location:register.php?st=1");
}
else
{
$query = mysqli_query($con,"INSERT INTO `user`(`user_id`,
`username`, `password`, `phone`, `DOB`, `email`, `name`, `sex`)
VALUES ('','not','$password','$phone','$DOB','$email','$name','$sex')") or
die("Error");
header("location:login.php?st=1");
}
?>

Login

<?php
session_start();
if(isset($_SESSION['user_info']))
header("location:control.php");
$alert = "";
$status = $_GET['st'];
if($status == 1)
{
$alert = "<script>alert('Registration Successful ! please login
now');</script>";
}
if($status == 2)
{
$alert = "<script>alert('Invalid email or password');</script>";
}
if($status == 3)
{
$alert = "<script>alert('Successfuly logged out');</script>";
}
?>
<html>
<?phpecho"$alert"; ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
<link rel="stylesheet" type="text/css" href="css/index.css" />
<script type="text/javascript" src="js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<style type="text/css">
label.error{
width:auto;
height:auto;
position:relative;
margin-left:10px;
background:#900;
color:#FFF;
font-size:12px;
font-weight:bold;
border-radius:5px;
padding:5px;
}
</style></head>

<body>
<script>
$(document).ready(function() {
$("#frm").validate({
rules:{
login_username:{
required:true
},
password:{
required:true
}
},
messages:{
login_username:{
required:'Please enter your Registered email id'
},
password:{
required:'Please enter your registered
password'
},
}
});

});
</script>
<?php include("header.php"); ?>
<table width="100%" align="center" style="padding-left:30px; background-
image:url(Images/from_background.jpg);">
<tr>
<td>
<form action="login_check.php" method="post" name="login" id="frm">
<table>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<tr>
<td>Email id :</td>
<td><input type="email" class="textbox" name="login_username"
height="54" size="40"/></td>
</tr>
<tr>
<td>Password :</td>
<td><input type="password" class="textbox" name="password" size="40"
required/></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" class="button" value="Login"/></td>
</tr>

<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</form>
</td>
<td>
<imgsrc="Images/Login_Key.png" />
</tr>
</table>
<?php include('footer.php'); ?>
</body>
</html>

16. Testing
Tests are frequently grouped by where they are added in the software
development process, or by the level of specificity of the test.

Unit testing:

Unit testing refers to tests that verify the functionality of a specific section
of code,
usually at the function level. In an object-oriented environment, this is
usually at the
class level, and the minimal unit tests include the constructors and
destructors.

These types of tests are usually written by developers as they work on code
(white-box style), to ensure that the specific function is working as
expected. One function might have multiple tests, to catch corner cases or
other branches in the code. building blocks the software uses work
independently of each other.
Unit testing alone cannot verify the functionality of a piece of software, but
rather is used to assure that the Unit testing is also called component testing.

USER:
ADMINISTRATOR :
17. Future enhancement thoughts

It is not our final work. We have also thought of adding some new
features to our project such as:

The current system can be extended to allow the users to create accounts
and save products in to wish list.
The users could subscribe for price alerts which would enable them to
receivemessages when price for products fall below a particular level.
The current system is confined only to the shopping cart process. It can be
extended to have an easy to use check out process.
Users can have multiple shipping and billing information saved. During
checkout
they can use the drag and drop feature to select shipping and billing
information.

18. Software Scope

Extensibility:
This software is extendable in ways that its original developers may not expect.
The following principle enhances extensibility like hide data structure, avoid
traversing
multiple links or methods, avoid case statements on object type and distinguish
public and private operations.
Reusability:
Reusability is possible as and when require in this application. We can update it
next
version. Reusable software reduces design, coding and testing cost by amortizing
effort
over several designs. Reducing the amount of code also simplifies understanding,
which
increases the likelihood that the code is correct. We follow up both types of
reusability:
Sharing of newly written code within a project and reuse of previously written
code on
new projects.
Understandability:
A method is understandable if someone other than the creator of the method
can understand the code (as well as the creator after a time lapse). We use the
method, which small and coherent helps to accomplish this.
Cost-effectiveness:
Its cost is under the budget and make within given time period. It is desirable
to aim for a system with a minimum cost subject to the condition that it must
satisfy the entire requirement.

19. Conclusion:

Online Bookstore Application is user friendly and easiest way to


search and purchase Online books.

20. Bibliography

Websites
Google.com
Scribd.com
Answers.com
EBay.in
W3CSchools.com
Amazon.com
Database Management Systems book - Korth
Books
Java 2 - Herbert Sildth
Wikipedia.com

You might also like