0% found this document useful (0 votes)
13 views51 pages

Bug Tracker - Comprehensive Bug Tracking & Modification System - Full

The document outlines the 'Bug Tracker - Comprehensive Bug Tracking & Modification System', a software application designed to assist in tracking and managing software bugs during development. It details the system's features, including bug lifecycle management, user permissions, and reporting capabilities, while contrasting it with existing inefficient bug tracking methods. Developed using PHP and MySQL, the system aims to enhance the efficiency of bug tracking and resolution processes in software development projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views51 pages

Bug Tracker - Comprehensive Bug Tracking & Modification System - Full

The document outlines the 'Bug Tracker - Comprehensive Bug Tracking & Modification System', a software application designed to assist in tracking and managing software bugs during development. It details the system's features, including bug lifecycle management, user permissions, and reporting capabilities, while contrasting it with existing inefficient bug tracking methods. Developed using PHP and MySQL, the system aims to enhance the efficiency of bug tracking and resolution processes in software development projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 51

BUG TRACKER - COMPREHENSIVE BUG TRACKING &

MODIFICATION SYSTEM

ABSTRACT

The project entitled “BUG TRACKER - COMPREHENSIVE BUG TRACKING &

MODIFICATION SYSTEM” is a software application that is designed to help quality

assurance which keeps tracks of reported software bugs in their work. It may be regarded as a

sort of issue tracking system. Having a Bug Tracking and Modification System is extremely

valuable in software development, and they are used extensively by companies developing

software products.

The project is designed to maintain the bugs life cycle. It records facts about known bugs

in its database. The facts that a bug was reported at a time have severity, the erroneous program

behavior and details on how to reproduce the bugs are captured. It also maintains details about

the identity of the person who reported it and any programmers who may be working on by

fixing it.

The project allows the administrator to configure permissions based on status, move the

bug to another status, or delete the bug. The system also allows administrator to configure the

bug statuses and move the bug from one state to other. This provides a clear centralized

overview of development requests and the state of the bug being fixed.

The project is designed to generate reports on the programmers who are fixing bugs,

various states of the bugs that are being fixed and details about the projects under which the bugs

are generated.
The project is developed under PHP environment as a front end with MY-SQL as

backend.

CONTENTS

S.NO TITLE PAGE NO

1 INTRODUCTION

1.1 PROBLEM DEFINITION

1.2 PROJECT DESCRIPTION

2 SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

2.2 PROPOSED SYSTEM

2.3 MODULE DESCRIPTION

2.4 SYSTEM ENVIRONMENT

2.5 SOFTWARE DESCRIPTION

3 SYSTEM DESIGN

3.1 SYSTEM FLOW DIAGRAM

3.2 DATABASE DESIGN

3.3 INPUT DESIGN

3.4 OUTPUT DESIGN

4 SYSTEM TESTING AND IMPLEMENTATION

4.1 SYSTEM TESTING

4.2 SYSTEM IMPLEMENTATION


5 CONCLUSION

SCOPE FOR FUTURE ENHANCEMENT

BIBLIOGRAPHY

APPENDICES

CHAPTER I

1. INTRODUCTION

1.1 ABOUT THE PROJECT

Before evaluating the BUG TRACKER - COMPREHENSIVE BUG TRACKING &


MODIFICATION SYSTEM, it is necessary to identify the requirements of the system.
Understanding these requirements will help to build a list of features so that the user can use it
for future evaluations.

To identify bug tracking requirements, it is necessary to understand the current bug tracking
process. The main points to be considered are

 Different roles and responsibilities of the people who will use the system.
 The workflow for managing and resolving bugs. Identify the steps in the process and
determine who is responsible for each step.
 The information needed to track for each bug.
 Type of reports and metrics that are needed.

CHAPTER 2
SYSTEM STUDY
2.1 EXISTING SYSTEM

In the Existing system the bugs are not properly maintained and they are simply relied on
shared lists and email to monitor the bugs. In this type of system it becomes difficult to track a
bug. If a bug is over looked then it may cause tremendous errors in the next phase. This also will
improve the cost of project and whatever necessary effort spent on the bug maintenance may not
be worthy. And there is no efficient search technique. One has to search the whole database for
the details of particular bug which might have occurred sometime earlier. It is both time
consuming and error prone.

2.1.1 DRAWBACKS

 There is no easy way to track the current status of a bug.


 Bugs are not categorized under a project hence difficult to manage.
 Getting details of a bug which was fixed earlier is a tedious task.
 It is very difficult to share the bug among several users as there is no proper maintenance
of the bugs.
 Moving a bug from one state to another is a complicated process.
 No easy way to identify the bugs which are of high severity and priority.
 Getting consolidated reports on various states of bugs are a time consuming operation.
2.2 PROPOSED SYSTEM

The proposed system has many advantages over the existing system. The system
maintains the products, bugs and the status of bug tracking. It has advantage of maintaining bug
history; it stores all the details from bugs origin to bugs resolution. So that, it would not be
difficult for the user to know how much effort spent on the bug. It also provides the advantage of
maintaining a list of users who are assigned with the bugs and details about the resolutions
provided by them. This product provides efficient search technique. As the number of bugs for a
product increases tremendously it would be difficult to search for a single record.

The project supports the searching based on status, priority, and operating system. It
helps user with bug hierarchy, which would be helpful in knowing the relation between bugs and
users allotted to the bug.

2.2.1 ADVANTAGES

 Bugs are categorized ad product and component based.


 Creating and changing bugs state are easy.
 Query bug list to any depth.
 Reporting and charting in more comprehensive way.
 User accounts to control the access and maintain security.
 Simple status and resolutions.
 Multi-level priorities and severities.
 Robust database back-end to manage the bug status.
2.4 SYSTEM SPECIFICATION

2.4.1 HARDWARE SPECIFICATION

PROCESSOR : I5 PROCESSOR
RAM : 8 GB DDR 1
HARD DISK : 500 GB
KEY BOARD : STANDARD IO4 KEYS
MONITOR : 14” COLOR MONITOR
MOUSE : OPTICAL MOUSE

2.4.2 SOFTWARE SPECIFICATION

OPERATING SYSTEM : MICROSOFT WINDOWS 10


FRONT END : PHP
BACK END : MY-SQL
2.5 SOFTWARE DESCRIPTION

PHP is the web development language written by and for web developers. PHP stands for
PHP: Hypertext Pre-processor. The product was originally named Personal Home Page Tools,
and many people still think that’s what the acronym stands for, but as it expanded in scope, a
new and more appropriate name was selected by community vote. PHP is currently in its sixth
major rewrite, called PHP6 or just plain PHP.
INTRODUCTION OF PHP
PHP is a server-side scripting language, usually used to create web applications in
combination with a web server, such as Apache. PHP can also be used to create command-line
scripts akin to Perl or shell scripts, but such use is much less common than PHP’s use as a web
language. Strictly speaking, PHP has nothing to do with layout, events, on-the-fly Document
Object Model (DOM) manipulation, or really anything about the look and feel of a web page. In
fact, most of what PHP does is invisible to the end user. Someone looking at a PHP page will not
necessarily be able to tell that it was not written purely in Hypertext Markup Language (HTML),
because the result of PHP is usually HTML
When compared to many other programming languages, PHP makes it easy to develop
powerful web application quickly (this is a blessing and a curse). Many of the most useful
specific functions (such as those for opening a connection to an Oracle database or fetching
email from an Internet Message Access Protocol [IMAP] server) are predefined. Most advanced
PHP users (including most of the development team members) are diehard hand coders.
PHP & MYSQL are also both stable in the sense of feature stability. Their respective
development teams have thus far enjoyed a clear vision of their project and refused to be
distracted by every new fad and ill-through-out user demand that comes along. Much of the
effort goes into incremental performance improvements, communicating with more major
database, or adding better OOP support.
PHP STRENGTHS

PHP has much strength, including the following:


 Performance
 Scalability
 Interfaces to many different database system
 Build-in libraries for many common web tasks
 Low cost
 Ease of learning and use
 Strong object oriented support
 Portability
 Flexibility of development approach
 Availability of source code
 Availability of support and documentation

NEW IN PHP

Major new features in PHP are as follows:


 Better object oriented support build around a completely new object
model
 Exception for scalable, maintainable error handling
 Simple XML for easy handling of XML data
USES OF PHP
PHP is a general-purpose scripting language that is especially suited to server-side web
development, in which case PHP generally runs on a web server. Any PHP code in a requested
file is executed by the PHP runtime, usually to create dynamic web page content or dynamic
images used on websites or elsewhere.
FEATURES IN PHP CLASSIFIEDS

TOP FEATURES
 Open Source (Only one file encrypted)
 Nice layout from start.
 Unlimited level of categories.
 Unique Extra Fields that is also sort able.
 Large user community.
 Regions Module is included (using Ajax).
ADMIN AREA
 Unlimited extra field’s creation.
 Over 300 different settings in settings-area.
 User friendly installer
 Set up searchable fields from admin area
 Backup tool
GENERAL FEATURES
 Print functionality removes navigation.
 Picture gallery with only one image per user.
 Sort on all columns.
 Easy renew function
 Advanced search, different search-page for different categories (template fields)
 Translated to 11 languages

INTRODUCTION TO MYSQL

MYSQL is an open source, SQL relational database management system (RDBMS) that
is free for many uses (more detail on that later). Each in its history, MYSQL occasionally faced
opposition because of its lack of support for some core SQL constructs such as sub selects and
foreign keys. Ultimately, however MYSQL found a broad, enthusiastic user base for its liberal
licensing terms, perky performance, and ease of use. Its acceptance was aided in part by the wide
variety of other technologies such as PHP, Perl, Python, and the like that have encouraged its use
through stable, well-documented modules and extensions. Databases are generally useful,
perhaps the most consistently useful family of software products (the “killer product”) in modern
computing. Like many competing products, both free and commercial, MYSQL isn’t a database
until give it some structure and form.

MYSQL STRENGTHS

MYSQL has much strength, including the following


 High performance
 Low cost
 Ease of configuring and learning
 Portability
 Availability of source code
 Availability of support

NEW IN MYSQL
Major changes introduced for MYSQL includes
 View
 Stored procedures
 Basic trigger support
 Cursor support
USES OF PHP AND MYSQL
When setting out to build a website and has different products
 Hardware for the web server
 An operating system
 A database management system
 A programming or scripting language
Some of these are dependent on the other, for example not all operating system run on all
hardware not all web servers support all programming language.
The majority of PHP code can be written to be portable between operating system and web
servers there are some PHP functions that specifically relate to the file system there are operating
system dependent.

2.3 MODULE SPECIFICATION

The System consists of the following modules:

 Project Creation
 Defects Management
 User Management
 Bug status Reports

PROJECT CREATION

In this project creation module, the testing project details will be submitted to the
database. It’s like a project administration. The registered project only user can use for testing
and find the defects and reports.

For every bug reported, for grouping of each bug, the bug has to be assigned to the
respective project. This module is used to maintain the project details such as project or module
name, developing version of the project, database used in the project. A separate table will be
designed to manage the project details.

DEFECTS MANAGEMENT

This is the core module of the project. Any new bug reported has to be properly
registered for tracking. At the time of bug registration, the user has to assign the bug to right
programmer for fixing it. When the programmer finishes the bug analysis, the status of the bug
has to be updated based on the result of the analysis. Software defects are expensive. Moreover,
the cost of finding and correcting defects represents one of the most expensive software
development activities. For the foreseeable future, it will not be possible to eliminate defects.
While defects may be inevitable, we can minimize their number and impact on our
projects. To do this development teams need to implement a defect management process that
focuses on preventing defects, catching defects as early in the process as possible, and
minimizing the impact of defects. A little investment in this process can yield significant
returns. Identification and analysis of the process in which a defect originated to identify ways to
improve the process to prevent future occurrences of similar defects. Also the validation process
that should have identified the defect earlier is analyzed to determine ways to strengthen that
process.

A bug can be closed on three different states.

 Bug Imported – This state mean a bug is duplicated to another similar bug
 Bug Closed – This is not a valid bug, hence closed without a fix
 Bug Fixed – Valid bug which is fixed

This module is responsible for registering new defects, assigning the task to user and
monitoring the status of the defect.

USER MANAGEMENT

It is required to have the list of programmer who can analyze and fix the bug. To fix a
bug, the admin will assign a bug programmer and track the status of the bug. A separate form
will be designed to manage the programmer details. This module helps the management to
evaluate the user performance in bug fixing.

In this module the members who are all involved in the testing (bug tracking) processes,
their details will be submitted and maintained. The following are the details to manage the users
in BUG TRACKING AND MODIFICATION SYSTEM: name of the user, user account name,
password, email id and contact number and role.
BUG STATUS REPORTS

After the team has started to find and fix bugs, you can track the team's progress toward
resolving and closing bugs by viewing the Bug Status report. This report shows the cumulative
bug count based on the bug state, priority, and severity.

You can use this report to answer the following questions:

 Is the team fixing bugs quickly enough to finish on time?


 Is the team fixing high priority bugs first?
 What is the distribution of bugs by priority and severity?
 How many bugs are assigned to each team member?

To analyze the quality metrics of a project, it is necessary to generate a consolidated


report on the bugs fixed on that project. Also, it is necessary to collect the list of projects and the
list of programmers who are involved in bug analysis and fix. The project is designed to generate
various user friendly reports such as bug status report, user reports and project detail reports.

In this Bug Status report to be useful and accurate, the team must perform the following
activities:

 Define bugs, and specify their Iteration and Area paths.


 Specify the Priority and Severity of each bug.
 Assign each bug to the team member who is working to resolve or close it.
 Update the state of each bug as it is fixed, verified, and closed.

User can review the report to determine the progress within iteration or over time.
Specifically, user can find answers to the following questions:

 How quickly are the team resolving and closing bugs?


 Is the team fixing bugs quickly enough to finish on time?
 Is the team fixing high priority bugs first?
 What is the distribution of bugs by priority and severity?
 How many bugs are assigned to each team member?
 Does any team member need help to resolve or close bugs?

This Bug Status report shows an increase in active bugs over time followed by a steady
progression of resolving and closing bugs, as the following illustration shows. When the team
fixes more bugs than it finds, the number of active bugs decreases.
CHAPTER 3

3. SYSTEM DESIGN AND DEVELOPMENT

3.1 FILE DESIGN


This system contains the menus for various kinds of operations. Menus and
Files are created for displaying the information about Bug Tracking And
Modification System. This system also contains the command buttons as part of
the user interface.
Menu driven programming is very easy to access the programs. In such a
way the system is developed.
This system contains the following menus:
 Create projects
 Configure projects
 Assign task
 View projects
 About
 Exit
APPENDICES

A. DATA FLOW DIAGRAM

DATA FLOW DIAGRAM

LEVEL 0

Developer

Valid Bug Tracking Tester Report


Admin Login And
Modification
System

Project
Status
LEVEL 1

Project
Allocation Allocation
table

Developer Developer
Details table

Bug
Admin Tracking Tester table
And Tester
Modification Details
System

Project Project table


Status

Defect Defect Table


details
3.2 DATABASE DESIGN

Database design is the process of producing a detailed data model of a database. This
logical data model contains all the needed logical and physical design choices and physical
storage parameters needed to generate a design in a Data Definition Language, which can then be
used to create a database. A fully attributed data model contains detailed attributes for each
entity.

The term database design can be used to describe many different parts of the design of an
overall database system. Principally, and most correctly, it can be thought of as the logical design
of the base data structures used to store the data. In the relational model these are the tables and
views. In an object database the entities and relationships map directly to object classes and
named relationships. However, the term database design could also be used to apply to the
overall process of designing, not just the base data structures, but also the forms and queries used
as part of the overall database application within the database management system (DBMS).

The process of doing database design generally consists of a number of steps which will
be carried out by the database designer. Usually, the designer must:

o Determine the relationships between the different data elements.


o Superimpose a logical structure upon the data on the basis of these relationships

The Design Process

1. Determine the purpose of your database - This helps prepare you for the remaining steps.
2. Find and organize the information required - Gather all of the types of information you
might want to record in the database, such as product name and order number.
3. Divide the information into tables - Divide your information items into major entities or
subjects, such as Products or Orders. Each subject then becomes a table.
4. Turn information items into columns - Decide what information you want to store in each
table. Each item becomes a field, and is displayed as a column in the table. For example,
an Employees table might include fields such as Last Name and Hire Date.
5. Specify primary keys - Choose each table’s primary key. The primary key is a column
that is used to uniquely identify each row. An example might be Product ID or Order ID.
6. Set up the table relationships - Look at each table and decide how the data in one table is
related to the data in other tables. Add fields to tables or create new tables to clarify the
relationships, as necessary.
7. Refine your design - Analyze your design for errors. Create the tables and add a few
records of sample data. See if you can get the results you want from your tables. Make
adjustments to the design, as needed.

Apply the normalization rules - Apply the data normalization rules to see if your tables are
structured correctly. Make adjustments to the tables.

3.3 INPUT DESIGN

Input design is a process of converting a user-oriented description of the input to the


computer-based system. This design is important to avoid errors in the input process and show
the correct direction to the management for getting the correct information from the
computerized system.

Input design must be in such a way that it must control the amount of input, avoid delay,
etc. It must be simple. The input design must ensure user-friendly screen, with simplicity,
providing ease of viewing & entering the data. Every input data is validating. If the data is not
valid, proper error message are displayed.

The main objective of designing input focus on:

 Controlling the amount of input required.


 Avoiding delayed response.
 Controlling errors.
 Keeping process simple.
 Avoiding errors

3.4 OUTPUT DESIGN

Computer output is the most important and direct source of information to the user.
Efficient, intelligible output design should improve the systems relationship with the user and
help in decision making.
General characteristic of the output forms is as follows:
 Each output is given a specific name or title.
 State whether each output field is to include significant zeros, spaces between fields and
alphabetic or any other data.
 Provide a sample of the output including areas where printing may appear and the
location of each field.
 The output information is also displayed on the screen. The layout sheet for displayed
output is similar to the layout chart for designing input.
The major reports that are produced using the Systematic Granite Exports Transaction
System are,
1. Bug status report
2. User reports
3. Project detail report
CHAPTER 4
4. SYSTEM TESTING AND IMPLEMENTATION

4.1 SYSTEM TESTING


The testing phase will be able to understand the different types of testing and the
significant aspect of it with relation to software quality assurance.

Objective of Testing:

Testing is an extremely important, although often neglected, activity in the software


quality initiative.
There are four basic concepts related to software testing. These are,
 Error Detection
 Error Removal
 Error Tracking
 Regression Testing
Error Detection:

It involves identifying the errors. This is not only involves classical testing methods; it
also involves inspections and walk-through or any type of approach to error detection.

When errors are reported from a customer, they are found because a customer runs a
specific user profile that was not adequately tested before the product was released. This is one
of the most serious types of error detection, as it involves a customer.

Error Removal:

It involves debugging and other strategies for identifying where the error occurs in the
code; the process necessary to identify what in the code causes error and removing it.
Error Tracking:

It is also important whenever an error has occurred any where in the software. It means
that someone or something has failed. It is important to find and correct the cause of the error, as
it is to fix the error itself.

Regression testing:

It is testing to see if the fix or rework to the code actually fixes the error, fixes it one
place and breaks the code in other places without actually fixing it at the point in the software
where the fix was attempted.

UNIT TESTING

The procedure level testing is made first. By giving improper inputs, the errors occurred
are noted and eliminated. Then the form level testing is made. For example storage of data to the
table in the correct manner is unit tested.

Each data field is unit tested by testing boundary condition. The process is verified by
giving minimum and maximum values for the input field. Also the duplicate username is given
and checked. The dates are entered in wrong manner and checked.

INTEGRATION TESTING

Testing is done for each module. After testing all the modules, the modules are integrated
and testing of the final system is done with the test data, specially designed to show that the
system will operate successfully in all its aspects conditions. Thus the system testing is a
confirmation that all is correct and an opportunity to show the user that the system works.
VALIDATION TESTING

The final step involves Validation testing, which determines whether the software
function as the user expected. The end-user rather than the system developer conduct this test
most software developers as a process called “Alpha and Beta Testing” to uncover that only the
end user seems able to find.

The compilation of the entire project is based on the full satisfaction of the end users. In
the project, validation testing is made in various forms. In defect entry form, different validations
are made to make sure the user enters the valid input.

4.2 SYSTEM IMPLEMENTATION

Implementation is the most crucial stage in achieving a successful system and giving the
user’s confidence that the new system is workable and effective. Implementation of a modified
application to be replaced an existing one. This type of conversation is relatively easy to handle,
provide there are no major changes in the system.

Each program is tested individually at the time of development using the data and has
verified that this program linked together in the way specified in the programs specification, the
computer system and its environment is tested to the satisfaction of the user. The system that has
been developed is accepted and proved to be satisfactory for the user. And so the system is going
to be implemented very soon. A simple operating procedure is included so that the user can
understand the different functions clearly and quickly.

The final stage is to document the entire system which provides components and the
operating procedures of the system.
CHAPTER 5

5. CONCLUSION

All the objectives of this project are satisfied. The intermediate reports can be used for
verification, if necessary in future. The system has been tested with sample data, with original
data and the system is found to run well.

The concern in which the proposed system will be implemented will find it more
efficient. The atmosphere has been made more efficient and interactive. The functioning of the
system can be further enhanced in a number of ways, though an attempt has been made for
security and high reliability.

The newly developed system had simplified the operation for bug tracking. It is portable
and flexible for further enhancement.

SUGGESTIONS

Although all the features of the proposed system are implemented, there is still scope for
future enhancements. The system is designed such a way that any new modules can be easily
added.

Following are some of the features which can be considered for enhancements:
1. The system can be enhanced to support online bug tracking
2. Automatic alerts can be given if a bug is not closed for longer period
3. Collect test results data for every bug fixed
4. Send email automatically to programmer on assignment of bug
5. Provide quick search method to list the related bugs from database
SCOPE FOR FUTURE ENHANCEMENT

 The future scope of the work reported in this thesis is as follows.


 Optimizing the queries when the mobility is high.
 Studying the proposed solutions to new wireless environments such as wireless sensor
networks, wireless mesh networks.
 Extending the query processing solutions using ontology.
 Addressing of the hardware level issues and proposing the solutions for the developer
community.
 Enhancing the approaches for real time support and resolving practical issues.
 Developing all –in-one model support by combining the different problems discussed.
BIBLIOGRAPHY
BOOK REFERENCES

 Domain-Driven Design in by Carlos Buenosvinos , Christian Soronellas , Keyvan


AkbaryPublisher: PicketPublished: June 2017
 PHP Objects, Patterns, and Practice, Fifth Edition by Matt
ZandstraPublisher: ApressPublished: December 2016
 Doyle, Matt. Beginning PHP 5.3 (Wrox Programmer to Programmer), 2009.
 Lerdorf, Rasmus. PHP Pocket Reference, O'Reilly, 2000.
 Nixon, Robin. Learning PHP, MySQL, JavaScript, and CSS: A Step-by-Step Guide to
Creating Dynamic Websites, O'Reilly, 2012.
 Nixon, Robin. Robin Nixon's PHP Crash Course: Learn PHP in 14 easy lectures,
O'Reilly, 2012.
 Ullman, Larry. PHP Advanced and Object-Oriented Programming: Visual QuickPro
Guide (3rd Edition), 2012.
 Ullman, Larry. PHP for the Web: Visual QuickStart Guide, 2011.
 Welling, Luke and Thomson, Laura. PHP and MySQL Web Development, Third Edition,
Sams, 2008.

WEBSITE REFERENCES
 https://www.w3schools.com/PHP/default.asp
 https://www.codecademy.com/en/tracks/PHP
 https://www.codeschool.com/learn/PHP
 https://www.sololearn.com/Course/PHP/
 https://www.guru99.com/PHP-tutorials.PHP
B. TABLE DESIGN

Table Name: Project


Purpose: This table is designed to store details about the projects for which the bugs are going to
be fixed.

Field Name Data Type Size


ProjectID Number 2
ProjectName Text 50
Platform Text 30
DB Text 20

Table Name: Programmer


Purpose: This table is designed to hold information about the programmer who will be analyzing
the bugs.

Field Name Data Type Size


PID Number 2
ProgName Text 50
Pwd Text 20
Email Text 25
Contact Text 20
Role Text 20
Table Name: Defects
Purpose: This table is maintains data about the defect submitted.

Field Name Data Type Size


DefectID Number 2
ProjectID Number 2
Summary Text 175
DetectedBy Text 20
Severity Text 20
Priority Text 20
DetectedDate Date 6
Status Text 20
Description Text 250
PID Number 2

Table Name: Admin


Description: This table maintains data for user authentication.

Field Name Data Type Size


AID Number 2
UserName Text 50
Pwd Text 30
C. SAMBLE CODING

<?php
// This file is www.developphp.com curriculum material
// Written by Adam Khoury January 01, 2011
// http://www.youtube.com/view_play_list?p=442E340A42191003
session_start(); // Start session first thing in script
// Script Error Reporting
error_reporting(E_ALL);
ini_set('display_errors', '1');
// Connect to the MySQL database
include "storescripts/connect_to_mysql.php";
?>
<?php
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
// Section 1 (if user attempts to add something to the cart from the product page)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
if (isset($_POST['pid'])) {
$pid = $_POST['pid'];
$wasFound = false;
$i = 0;
// If the cart session variable is not set or cart array is empty
if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) < 1) {
// RUN IF THE CART IS EMPTY OR NOT SET
$_SESSION["cart_array"] = array(0 => array("item_id" => $pid, "quantity" =>
1));
} else {
// RUN IF THE CART HAS AT LEAST ONE ITEM IN IT
foreach ($_SESSION["cart_array"] as $each_item) {
$i++;
while (list($key, $value) = each($each_item)) {
if ($key == "item_id" && $value == $pid) {
// That item is in cart already so let's adjust its quantity
using array_splice()
array_splice($_SESSION["cart_array"], $i-1, 1,
array(array("item_id" => $pid, "quantity" => $each_item['quantity'] + 1)));
$wasFound = true;
} // close if condition
} // close while loop
} // close foreach loop
if ($wasFound == false) {
array_push($_SESSION["cart_array"], array("item_id" => $pid,
"quantity" => 1));
}
}
header("location: cart.php");
exit();
}
?>
<?php
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
// Section 2 (if user chooses to empty their shopping cart)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
if (isset($_GET['cmd']) && $_GET['cmd'] == "emptycart") {
unset($_SESSION["cart_array"]);
}
?>
<?php
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
// Section 3 (if user chooses to adjust item quantity)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
if (isset($_POST['item_to_adjust']) && $_POST['item_to_adjust'] != "") {
// execute some code
$item_to_adjust = $_POST['item_to_adjust'];
$quantity = $_POST['quantity'];
$quantity = preg_replace('#[^0-9]#i', '', $quantity); // filter everything but numbers
if ($quantity >= 100) { $quantity = 99; }
if ($quantity < 1) { $quantity = 1; }
if ($quantity == "") { $quantity = 1; }
$i = 0;
foreach ($_SESSION["cart_array"] as $each_item) {
$i++;
while (list($key, $value) = each($each_item)) {
if ($key == "item_id" && $value == $item_to_adjust) {
// That item is in cart already so let's adjust its quantity
using array_splice()
array_splice($_SESSION["cart_array"], $i-1, 1,
array(array("item_id" => $item_to_adjust, "quantity" => $quantity)));
} // close if condition
} // close while loop
} // close foreach loop
}
?>
<?php
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
// Section 4 (if user wants to remove an item from cart)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
if (isset($_POST['index_to_remove']) && $_POST['index_to_remove'] != "") {
// Access the array and run code to remove that array index
$key_to_remove = $_POST['index_to_remove'];
if (count($_SESSION["cart_array"]) <= 1) {
unset($_SESSION["cart_array"]);
} else {
unset($_SESSION["cart_array"]["$key_to_remove"]);
sort($_SESSION["cart_array"]);
}
}
?>
<?php
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
// Section 5 (render the cart for the user to view on the page)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
$cartOutput = "";
$cartTotal = "";
$pp_checkout_btn = '';
$product_id_array = '';
if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) < 1) {
$cartOutput = "<h2 align='center'>Your shopping cart is empty</h2>";
} else {
// Start PayPal Checkout Button
$pp_checkout_btn .= '<form action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="[email protected]">';
// Start the For Each loop
$i = 0;
foreach ($_SESSION["cart_array"] as $each_item) {
$item_id = $each_item['item_id'];
$sql = mysql_query("SELECT * FROM products WHERE id='$item_id' LIMIT
1");
while ($row = mysql_fetch_array($sql)) {
$product_name = $row["product_name"];
$price = $row["price"];
$details = $row["details"];
}
$pricetotal = $price * $each_item['quantity'];
$cartTotal = $pricetotal + $cartTotal;
setlocale(LC_MONETARY, "en_US");
$pricetotal = money_format("%10.2n", $pricetotal);
// Dynamic Checkout Btn Assembly
$x = $i + 1;
$pp_checkout_btn .= '<input type="hidden" name="item_name_' . $x . '"
value="' . $product_name . '">
<input type="hidden" name="amount_' . $x . '" value="' . $price . '">
<input type="hidden" name="quantity_' . $x . '" value="' . $each_item['quantity'] . '"> ';
// Create the product array variable
$product_id_array .= "$item_id-".$each_item['quantity'].",";
// Dynamic table row assembly
$cartOutput .= "<tr>";
$cartOutput .= '<td><a href="product.php?id=' . $item_id . '">' . $product_name .
'</a><br /><img src="inventory_images/' . $item_id . '.jpg" alt="' . $product_name. '"
width="40" height="52" border="1" /></td>';
$cartOutput .= '<td>' . $details . '</td>';
$cartOutput .= '<td>$' . $price . '</td>';
$cartOutput .= '<td><form action="cart.php" method="post">
<input name="quantity" type="text" value="' . $each_item['quantity'] . '" size="1"
maxlength="2" />
<input name="adjustBtn' . $item_id . '" type="submit" value="change" />
<input name="item_to_adjust" type="hidden" value="' . $item_id . '" />
</form></td>';
//$cartOutput .= '<td>' . $each_item['quantity'] . '</td>';
$cartOutput .= '<td>' . $pricetotal . '</td>';
$cartOutput .= '<td><form action="cart.php" method="post"><input
name="deleteBtn' . $item_id . '" type="submit" value="X" /><input name="index_to_remove"
type="hidden" value="' . $i . '" /></form></td>';
$cartOutput .= '</tr>';
$i++;
}
setlocale(LC_MONETARY, "en_US");
$cartTotal = money_format("%10.2n", $cartTotal);
$cartTotal = "<div style='font-size:18px; margin-top:12px;' align='right'>Cart Total : ".
$cartTotal." USD</div>";
// Finish the Paypal Checkout Btn
$pp_checkout_btn .= '<input type="hidden" name="custom" value="' . $product_id_array
. '">
<input type="hidden" name="notify_url"
value="https://www.yoursite.com/storescripts/my_ipn.php">
<input type="hidden" name="return"
value="https://www.yoursite.com/checkout_complete.php">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cbt" value="Return to The Store">
<input type="hidden" name="cancel_return"
value="https://www.yoursite.com/paypal_cancel.php">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif"
name="submit" alt="Make payments with PayPal - its fast, free and secure!">
</form>';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Your Cart</title>
<link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
</head>
<body>
<div align="center" id="mainWrapper">
<?php include_once("template_header.php");?>
<div id="pageContent">
<div style="margin:24px; text-align:left;">

<br />
<table width="100%" border="1" cellspacing="0" cellpadding="6">
<tr>
<td width="18%" bgcolor="#C5DFFA"><strong>Product</strong></td>
<td width="45%" bgcolor="#C5DFFA"><strong>Product Description</strong></td>
<td width="10%" bgcolor="#C5DFFA"><strong>Unit Price</strong></td>
<td width="9%" bgcolor="#C5DFFA"><strong>Quantity</strong></td>
<td width="9%" bgcolor="#C5DFFA"><strong>Total</strong></td>
<td width="9%" bgcolor="#C5DFFA"><strong>Remove</strong></td>
</tr>
<?php echo $cartOutput; ?>
<!-- <tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr> -->
</table>
<?php echo $cartTotal; ?>
<br />
<br />
<?php //echo $pp_checkout_btn; ?>
<br />
<br />
<a href="cart.php?cmd=emptycart">Click Here to Empty Your Shopping Cart</a>
</div>
<br />
</div>
<?php include_once("template_footer.php");?>
</div>
</body>
</html>
CATEGORY
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
Yes this is supposed to be empty like this... happy coding.
</body>
</html>
Index
<?php
// This file is www.developphp.com curriculum material
// Written by Adam Khoury January 01, 2011
// http://www.youtube.com/view_play_list?p=442E340A42191003
// Script Error Reporting
error_reporting(E_ALL);
ini_set('display_errors', '1');
?>
SAMPLE SCREENSHOTS

You might also like