You are on page 1of 69

A PROJECT REPORT ON

“ ONLINE AUCTION SYSTEM”

Submitted in Partial Fulfillment of Requirement

For the award of the degree

In

Bachelor of Computer Applications

Of

BANGALORE UNIVERSITY

Submitted By

S PADMA PRIYA

15VFSB7038
Under the Guidance of

Mrs. APOORVA A

1
DEPARTMENT OF COMPUTER SCIENCE

CERTIFICATE

This is to certify that S PadmaPriya - Register No. 15VFSB7038,have satisfactorily


completed the Sixth Semester BCA Project titled “ONLINE AUCTION
SYSTEM”. This Report is submitted in partial fulfillment of the requirements for
the award of the Degree in Bachelors of Computer Applications, awarded by
Bangalore University, during the Academic Year 2017-2018.

Guide Head of the Department

APOORVA A NAGARAJU KILARI

Signature of the External Examiners:

1. ___________

2. ___________

2
DECLARATION
I hereby declare that the project report entitled “Online auction system”
was prepared by me during the year 2017-2018 and was submitted to the
Bangalore University, in partial fulfillment of the requirements for the
award of the degree in bachelor of computer applications. I also declare
that this project report is original and genuine and it has not been
submitted to any other university for the award of any degree, diploma
or other similar titles or purposes.

Date: 09/05/2018 Signature of the Candidate

Place: New Horizon College S. Padma Priya

(Marathahalli) [USN: 15VFSB7038

3
ACKNOWLEDGEMENT

With immense pleasure, we take this opportunity to express our gratitude to the
beloved Principal Dr.R.Bodhisatvan for providing valuable guidance and support
during the course.

We would like to thanks Mr. Nagaraju Kilari, Head of the Department – BCA for
his unending support and encouragement during the development of this project.

We would like to acknowledge the interest and the support extended by our project
guide Mrs. Apoorva, Department of BCA, to make this project implementation
successful.

Finally, we wish to thank every individual who helped us directly or indirectly in


making the project a grand success.

4
TABLE OF CONTENT
SL.NO CONTENTS PAGE NO.

CHAPTER-1 INTRODUCTION TO PROJECT


1.1 ABSTRACT 6
1.2 PROBLEM STATEMENT 7
1.3 MODULE DESCRIPTION 7
CHAPTER-2 SYSTEM ANALYSIS
2.1 REQUIREMENT SPECIFICATION 9
2.2 HARDWARE REQUIREMENTS 9
2.3 SOFTWARE REQUIREMENTS 10
2.3.1 INTRODUCTION TO HTML 10
2.3.2 INTRODUCTION TO CSS 11
2.3.3 INTRODUCTION TO PHP 11
2.3.4 INTRODUCTION TO MYSQL 12
2.3.5 INTRODUCTION TO XAMPP 13
2.4 EXISTING SYSTEM 14
2.5 PROPOSED SYSTEM 14
CHAPTER-3 SYSTEM DESIGN
3.1 TABLE STRUCTURE 15
3.2 DATA FLOW DIAGRAM 18
3.3 FORM DESIGN 19
CHAPTER-4 CODING AND DEVELOPMENT
4.1 SOURCE CODE 22
CHAPTER-5 TESTING AND IMPLEMENTATION
5.1 INTORDUCTION TO TESTING 49
5.2 TYPES OF TESTING 51
CHAPTER-6 CONCLUSION
6.1 FUTURE ENHANCEMENT 52
CHAPTER-7 BIBLIOGRAPHY 53

5
CHAPTER 1

INTRODUCTION TO PROJECT

1.1 ABSTRACT

The project “Online auction project” is the website aimed at carrying out
bidding. This is like an auction house provided online where in this users
can take part from the comfort of their homes. This site also brings the
auction to the auction to the fingertips of the aspiring bidders and sellers to
a wider section of the product. In this particular website, where buyers and
sellers interact each other to exchange products to get a fair deal.

6
1.2 PROBLEM STATEMENT

ONLINE AUCTION SYSTEM

A online auction system is being designed for the user, so that they can easily take
part in the bidding conducted online. The bidding takes place in a normal form way
the people interested to buying the things placed in auction are supposed to bid for
the particular product in a particular time period. The person placing the highest
bid gets the right to own the item at the end of the bid. Bid is the exact amount of
money offered on an item in auction in the bid by seller. The buyer with the
highest bid is the one who finalizes the purchase of the item with the seller of the
item. Winner is generally the person offering the highest bidding amount is called
the winner of the auction.

1.3 MODULE DESCRIPTION:

1. Login:
The login Module, consists of two sub modules:
 User Login- In this module, user can access this webpage and can
bid for his desired product.
 Admin login-In this module , the admin can login and add the
products for bidding purpose

2. Product:

This module contains two sub modules:

 Current bidding- In this module, the current bidding products are


display.
 Completed bidding- In this module, the products that are
completed for bidding are displayed.

7
3. Profile:

This module contains two sub modules:

 Update: In this module, the users can update their profile.


 Change password: In this module, the users can change their
password.

4. Feedback:

In this module, the users can send their feedback about the
website.

8
CHAPTER 2

SYSTEM ANALYSIS
2.1 SOFTWARE REQUIREMENT SPECIFICATION

Software requirements specification (SRS) is a description of


a software system to be developed. It is modelled after Amit Singh
Rewets’ business requirements specification (CONOPS), also known as
a stakeholder requirements specification. The software requirements
specification lays out functional and non-functional requirements, and it
may include a set of use cases that describe user interactions that the
software must provide.
Software requirements specification establishes the basis for an agreement
between customers and contractors or suppliers on how the software
product should function (in a market-driven project, these roles may be
played by the marketing and development divisions). Software
requirements specification is a rigorous assessment of requirements before
the more specific system design stages, and its goal is to reduce later
redesign. It should also provide a realistic basis for estimating product
costs, risks, and schedules. Used appropriately, software requirements
specifications can help prevent software project failure.
The software requirements specification document lists sufficient and
necessary requirements for the project development. To derive the
requirements, the developer needs to have clear and thorough
understanding of the products under development. This is achieved
through detailed and continuous communications with the project team and
customer throughout the software development process.
2.2 HARDWARE REQUIREMENTS

 Processor Intel CORE I3


 Main Memory 8GB
 Hard Disk Capacity 1 TB
 Keyboard 101 keys
 Monitor VGA with resolution

9
2.3 SOFTWARE REQUIREMENT

 Server Scripting Language:PHP 7.2.3


 Client Scripting Language:Javascript
 Web application server:apache 2.4
 Markup Language:HTML 5
 DBMS:MS SQL Server 2014
 Web Browser:Google chrome
 Operating system:windows 10

2.3.1 INTRODUCTION TO HTML


Hypertext Mark-up Language (HTML) is the standard mark-up language
and JavaScript, it forms a triad of cornerstone technologies for the World
Wide Web.
Web browsers receive HTML documents from a web server or from local
storage and render the documents into multimedia web pages. HTML
describes the structure of a web page semantically and originally included
cues for the appearance of the document.
HTML elements are the building blocks of HTML pages. With HTML
constructs, images and other objects such as interactive forms may be
embedded into the rendered page. HTML provides a means to
create structured documents by denoting structural semantics for text such
as headings, paragraphs, lists, links, quotes and other items. HTML
elements are delineated by tags, written using angle brackets.
HTML can embed programs written in a scripting language such
as JavaScript, which affects the behaviour and content of web pages.
Inclusion of CSS defines the look and layout of content. The World Wide
Web Consortium (W3C), maintainer of both the HTML and the CSS
standards, has encouraged the use of CSS over explicit presentational
HTML since 1997.
.

10
2.3.2 INTRODUCTION TO CSS
Cascading Style Sheets (CSS) is a style sheet language used for
describing the presentation of a document written in a markup
language like HTML.CSS is a cornerstone technology of the World Wide
Web, alongside HTML and JavaScript.
CSS is designed to enable the separation of presentation and content,
including layout, colours, and fonts. This separation can improve
content accessibility, provide more flexibility and control in the specification
of presentation characteristics, enable multiple web pages to share
formatting by specifying the relevant CSS in a separate .css file, and
reduce complexity and repetition in the structural content.
Separation of formatting and content also makes it feasible to present the
same markup page in different styles for different rendering methods, such
as on-screen, in print, by voice (via speech-based browser or screen
reader), and on Braille-based tactile devices. CSS also has rules for
alternate formatting if the content is accessed on a mobile device.
The name cascading comes from the specified priority scheme to
determine which style rule applies if more than one rule matches a
particular element. This cascading priority scheme is predictable.
The CSS specifications are maintained by the World Wide Web
Consortium (W3C). Internet media type (MIME type) text/css is
registered for use with CSS by RFC 2318 (March 1998). The W3C
operates a free CSS validation service for CSS documents.

11
2.3.3 INTRODUCTION TO PHP

PHP: Hypertext Preprocessor (or simply PHP) is a server-side


scripting language designed for web development but also used as
a general-purpose programming language. It was originally created
by Rasmus Lerdorf in 1994, the PHP reference implementation is now
produced by The PHP Group.PHP originally stood for Personal Home
Page, but it now stands for the recursive acronym PHP: Hypertext
Preprocessor.
PHP code may be embedded into HTML code, or it can be used in
combination with various web template systems, web content management
systems, and web frameworks. PHP code is usually processed by a
PHP interpreter implemented as a module in the web server or as
a Common Gateway Interface (CGI) executable. The web server combines
the results of the interpreted and executed PHP code, which may be any
type of data, including images, with the generated web page. PHP code
may also be executed with a command-line interface (CLI) and can be
used to implement standalone graphical applications.
The standard PHP interpreter, powered by the Zend Engine, is free
software released under the PHP License. PHP has been widely ported
and can be deployed on most web servers on almost every operating
system and platform, free of charge.
The PHP language evolved without a written formal specification or
standard until 2014, leaving the canonical PHP interpreter as a de
facto standard. Since 2014 work has gone on to create a formal PHP
specification.
During the 2010s there have been increased efforts towards
standardisation and code sharing in PHP applications by projects such
as PHP-FIG in the form of PSR-initiatives as well as Composer
dependency manager and the Packagist repository.

12
2.3.4 INTRODUCTION TO MYSQL

MySQL is an open-source relational database management system. Its


name is a combination of "My”, the name of co-founder Michael Widenius's
daughter, and "SQL", the abbreviation for Structured Query Language. The
MySQL development project has made its source code available under the
terms of the GNU General Public License, as well as under a variety
of proprietary agreements. MySQL was owned and sponsored by a
single for-profit firm, the Swedish company MySQL AB, now owned
by Oracle Corporation. For proprietary use, several paid editions are
available, and offer additional functionality.
MySQL is a central component of the LAMP open-source web application
software stack (and other "AMP" stacks). LAMP is an acronym for
"Linux, Apache, MySQL, Perl/PHP/Python". Applications that use the
MySQL database include: TYPO3, MODx, Joomla, WordPress, Simple
Machines Forum, phpBB, MyBB, and Drupal.
The MySQL server software itself and the client libraries use dual-
licensing distribution. They are offered under GPL version 2, beginning
from 28 June 2000 (which in 2009 has been extended with
a FLOSS License Exception) or to use a proprietary license.
Support can be obtained from the official manual. Free support additionally
is available in different IRC channels and forums. Oracle offers paid
support via its MySQL Enterprise products. They differ in the scope of
services and in price. Additionally, a number of third party organisations
exist to provide support and services, including MariaDB and Percona.

13
2.3.5 INTRODUCTION TO XAMPP

XAMPP is a free and open source cross-platform web server solution


stack package developed by Apache Friends, consisting mainly of
the Apache HTTP Server, MariaDB database, and interpreters for scripts
written in the PHP and Perl programming languages.XAMPP stands for
Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P). It is a
simple, lightweight Apache distribution that makes it extremely easy for
developers to create a local web server for testing and deployment
purposes. Everything needed to set up a web server – server application
(Apache), database (MariaDB), and scripting language (PHP) – is included
in an extractable file. XAMPP is also cross-platform, which means it works
equally well on Linux, Mac and Windows. Since most actual web server
deployments use the same components as XAMPP, it makes transitioning
from a local test server to a live server extremely easy as well.
XAMPP can exist on a single computer, and any given instance can be
copied from one computer to another. XAMPP is offered in both a full and a
standard version (Smaller version).

14
2.3EXISTING SYSTEM

A detailed study of the process must be made by the various techniques like
interviews, questionaries etc. The data collected by the sources must be
scrutinized to arrive to a conclusion. The conclusion is an understanding of how
the system functions. The system is called existing system. Now the existing
system is subjected to case study and problem area are identified. The designer
now functions as a problem solver and tries to sort out the difficulties that the
enterprise faces.

2.5 PROPOSED SYSTEM

The aim of proposed system is to develop a system of improved facilities. The


proposed system can overcome all the limitations of the existing system. The
system provides proper security and reduces the manual work.

 Security of work
 Ensure data accuracy
 Minimize time needed for the various processing
 Greater efficiency
 Better services

15
CHAPTER 3

SYSTEM DESIGN

3.1 Table Structure

 Login Table

Sl.no Name Datatype Constraints Description


1. Username Varchar Not Null Enter the Username
2. Password Varchar Not Null Enter the Password

 Sign Up Table

Sl,no Name Datatype Constraints Description


1. Fname Varchar NotNull Enter the firstname
2. Lastname Varchar NotNull Enter the lastname
3. Email Varchar NotNull Enter the emai
4. Mob Bigint NotNull Enter the contact
number
5. Uname Varchar NotNull Enter the username
6. Pass Varchar NotNull Enter the password
7. Supervisor Text NotNull To check admin or not
8. SecurityQuestion Varchar NotNull Enter the
securityquestion
9. SecurityAnswer Varchar NotNull Enter the securityanswer

16
 Products Table

Sl.no Name Datatype Constraint Description


s
1. Prod_ID Int Not Null Id for an product
2. Image_id Int Not Null Id for image
3. Username Varchar Not Null Enter the usrname
4. Prodname Varchar Not Null Name of the prduct
5. Description Varchar Not Null Description of the product
6. Price Double Not Null Enter the price of the
product
7. Bid end date Datetime Not null Enter the end date of bid
8. SellerName Varchar Not Null Enter the seller name
9. SellerAddre Varchar Not Null Enter the address of the
ss seller
10. SellerPhone Bigint NotNull Enter the contact number

 FeedBack Table

Sl.No Name Datatype Constraints Description


1. Name varchar NotNull Enter the name
2. EmailID varchar NotNull Enter the emailed
3. Subject Varchar NotNull Enter the subject
4. Message varchar NotNull Enter the message

17
 User Bid

Sl.no. Name Datatype Constraints Description


1. BidID Varchar NotNull Enter the bid id
2. ProdID Varchar NotNull Enter the prodid
3. UserName Varchar Null Enter the username
4. BidAmount Double NotNull Enter the amount
5. Bidwinner Int NotNull Displays the winner

18
3.2 DATA FLOW DIAGRAM

19
3.3 FORM DESIGN
1. LOGIN FORM

2. REGISTRATION FORM

20
3. ADD PRODUCT

4. USER BID

21
5. FEEDBACK

22
CHAPTER-4

CODING AND DEVELOPMENT

SOURCE CODE

LOGIN FORM

?php

$conn=mysqli_connect('localhost','root','db$123','signup');

if(!empty($_POST)){

//echo "Reached 1";

$uname=$_POST['username'];

$pass=$_POST['password'];

//echo '<br />',$uname,' ',$pass;

$sql = "select uname, pass, supervisor from signup2 where uname='$uname'";

//echo '<br />',$sql;

$result = mysqli_query($conn,$sql);

if(mysqli_num_rows($result))

while($row = $result->fetch_assoc()) {

if($row["pass"]===$pass)

echo "Passed";

23
if(strtoupper($row["supervisor"])==='YES')

session_start();

$_SESSION["auth"]=true;

$_SESSION["uname"]=$row["uname"];

header( 'Location:display.php' );

else

session_start();

$_SESSION["auth"]=true;

$_SESSION["uname"]=$row["uname"];

header( 'Location:homepage.php' );

else

echo "Wrong username/password";

exit();

?>

24
<body bgcolor=blue>

<div class="loginbox">

<h1>LOGIN HERE</h1>

<form method="POST" action="auction_login.php">

<p>USERNAME</p>

<input type="text" name="username" placeholder="Enter username">

<p>PASSWORD</p>

<input type="password" name="password" placeholder="Enter password">

<input type="submit" name="submit" value="LOGIN">

<div class="lg_links">

<div class="llink">

<a href="auction_signup.php">create an account??</a>

</div>

<div class="rlink">

<a href="ForgotPass.php">Forgot Password??</a>

</div>

</div>

</form>

</body>

</html>

25
REGISTRATION FORM

<?php

$conn=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn)

echo"";

else

echo"not connected";

if(!empty($_POST))

$fname=$_POST['firstname'];

$lname=$_POST['lastname'];

$email=$_POST['emailid'];

$mobnum=$_POST['mobnum'];

$uname=$_POST['username'];

$pass=$_POST['password'];

$admin=$_POST['admin'];

$securityquestion=$_POST['sc'];

$securityanswer=$_POST['securityanswer'];

26
$qu="INSERT INTO signup.signup2
VALUES('$fname','$lname','$email','$mobnum','$uname','$pass', '$admin',
'$securityquestion','securityanswer')";

$q=mysqli_query($conn,$qu);

if($q)

header("Refresh:0.2; url=auction_login.php");

else

echo"unsuccessful";

exit();

?>

<body>

<form action="auction_signup.php" method="POST">

<div class="signupbox">

<h1>SIGN UP </h1>

<br>

<p>FIRSTNAME</p>

<input type="text" name="firstname"

27
placeholder="Enter your firstname">

<p>LASTNAME</p>

<input type="text" name="lastname"

placeholder="Enter your lastname">

<p>EMAIL ID</p>

<input type="text" name="emailid"

placeholder="Enter your emailid">

<p>MOBILE NUMBER</p>

<input type="text" name="mobnum"

placeholder="enter your mobnum">

<p>USERNAME</p>

<input type="text" name="username"

placeholder="enter your username">

<p>PASSWORD</p>

<input type="password" name="password"

placeholder="enter your password"><br>

<br>

<p>Admin?</p>

<select style="width: 200px;" name="admin">

<option>No</option>

<option>Yes</option>

</select>

28
<br><br>

<p>SECURITY QUESTION</p> <br>

<select name="sc">

<option> which is your favorite colour??</option>

<option> which is your favorite food??</option>

<option> which is your favorite sports??</option>

</select><br>

<br>

<p>SECURITY ANSWER</p>

<input type ="text" name="securityanswer" placeholder="Enter your security


answer">

<input type="submit" name="submit1" value="SIGN IN"><br>

<a href="auction_login.php"><input type="submit" name="submit2"


value="CANCEL"></a>

</div>

</form>

</body>

29
ADD PRODUCT FORM

<?php

$conn=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn)

echo"";

else

echo"not connected";

if(isset($_POST['submit4']))

$image=$_POST['image'];

$username=$_POST['username'];

$productadd=$_POST['productadd'];

$description=$_POST['description'];

$price=$_POST['price'];

$date=$_POST['date'];

$sellername=$_POST['sellername'];

$sellerloc=$_POST['sellerloc'];

$sellercontact=$_POST['sellercontact'];

30
$qu="INSERT INTO productadd
VALUES('".$image."','".$username."','".$productadd."','".$description."','".$price."
','".$date."','".$sellername."','".$sellerloc."','".$sellercontact."')";

$q=mysqli_query($conn,$qu);

if($q)

header("Refresh:0.2; url=myaccount.php");

else

echo"unsuccessful";

exit();

?>

<tr>

<td><p>PRODUCT NAME:</p></td>

<td>

<input type="textbox" name="prodName" placeholder="Enter your product


name">

<span class="error">* <?php if(!empty($prodNameErr)){echo $prodNameErr;}


?></span>

</td>

31
</tr>

<tr>

<td><p>DESCRIPTION:</p></td>

<td>

<textarea name="description" rows=10 cols=40></textarea>

<span class="error">* <?php if(!empty($descErr)){echo $descErr;} ?></span>

</td>

</tr>

<tr>

<td><p>PRICE:</p></td>

<td>

<input type="textbox" name="price" placeholder="Enter the starting price of your


product">

<span class="error">* <?php if(!empty($priceErr)){echo $priceErr;} ?></span>

</td>

</tr>

<tr>

<td><p>SELLER NAME:</p></td>

<td>

<input type="textbox" name="sellerName" placeholder="Enter seller name">

<span class="error">* <?php if(!empty($sellerNameErr)){echo $sellerNameErr;}


?></span>

32
</td>

</tr>

<tr>

<td><p>SELLER LOCATION:</p></td>

<td>

<input type="textbox" name="sellerAddress" placeholder="Enter your location">

<span class="error">* <?php if(!empty($sellerAddressErr)){echo


$sellerAddressErr;} ?></span>

</td>

</tr>

<tr>

<td><p>SELLER CONTACT:</p></td>

<td>

<input type="textbox" name="sellerPhone" placeholder="Enter your mobile


number">

<span class="error">* <?php if(!empty($sellerPhoneErr)){echo $sellerPhoneErr;}


?></span>

</td>

</tr>

<tr>

<td><input type="submit" name="submit4" value="ADD"></td>

<td><a href="display.php"> <input type="button" name=""


value="CANCEL"></a></td>

33
</tr>

</table>

</div>

</form>

ADD PRODUCT FORM

<?php

$conn=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn)

echo"";

else

echo"not connected";

if(isset($_POST['submit4']))

$image=$_POST['image'];

$username=$_POST['username'];

$productadd=$_POST['productadd'];

$description=$_POST['description'];

$price=$_POST['price'];

34
$date=$_POST['date'];

$sellername=$_POST['sellername'];

$sellerloc=$_POST['sellerloc'];

$sellercontact=$_POST['sellercontact'];

$qu="INSERT INTO productadd


VALUES('".$image."','".$username."','".$productadd."','".$description."','".$price."
','".$date."','".$sellername."','".$sellerloc."','".$sellercontact."')";

$q=mysqli_query($conn,$qu);

if($q)

header("Refresh:0.2; url=myaccount.php");

else

echo"unsuccessful";

exit();

?>

<tr>

<td><p>PRODUCT NAME:</p></td>

<td>

35
<input type="textbox" name="prodName" placeholder="Enter your product
name">

<span class="error">* <?php if(!empty($prodNameErr)){echo $prodNameErr;}


?></span>

</td>

</tr>

<tr>

<td><p>DESCRIPTION:</p></td>

<td>

<textarea name="description" rows=10 cols=40></textarea>

<span class="error">* <?php if(!empty($descErr)){echo $descErr;} ?></span>

</td>

</tr>

<tr>

<td><p>PRICE:</p></td>

<td>

<input type="textbox" name="price" placeholder="Enter the starting price of your


product">

<span class="error">* <?php if(!empty($priceErr)){echo $priceErr;} ?></span>

</td>

</tr>

<tr>

<td><p>SELLER NAME:</p></td>

36
<td>

<input type="textbox" name="sellerName" placeholder="Enter seller name">

<span class="error">* <?php if(!empty($sellerNameErr)){echo $sellerNameErr;}


?></span>

</td>

</tr>

<tr>

<td><p>SELLER LOCATION:</p></td>

<td>

<input type="textbox" name="sellerAddress" placeholder="Enter your location">

<span class="error">* <?php if(!empty($sellerAddressErr)){echo


$sellerAddressErr;} ?></span>

</td>

</tr>

<tr>

<td><p>SELLER CONTACT:</p></td>

<td>

<input type="textbox" name="sellerPhone" placeholder="Enter your mobile


number">

<span class="error">* <?php if(!empty($sellerPhoneErr)){echo $sellerPhoneErr;}


?></span>

</td>

</tr>

37
<tr>

<td><input type="submit" name="submit4" value="ADD"></td>

<td><a href="display.php"> <input type="button" name=""


value="CANCEL"></a></td>

</tr>

</table>

</div>

</form>

ADD PRODUCT FORM

<?php

$conn=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn)

echo"";

else

echo"not connected";

if(isset($_POST['submit4']))

$image=$_POST['image'];

38
$username=$_POST['username'];

$productadd=$_POST['productadd'];

$description=$_POST['description'];

$price=$_POST['price'];

$date=$_POST['date'];

$sellername=$_POST['sellername'];

$sellerloc=$_POST['sellerloc'];

$sellercontact=$_POST['sellercontact'];

$qu="INSERT INTO productadd


VALUES('".$image."','".$username."','".$productadd."','".$description."','".$price."
','".$date."','".$sellername."','".$sellerloc."','".$sellercontact."')";

$q=mysqli_query($conn,$qu);

if($q)

header("Refresh:0.2; url=myaccount.php");

else

echo"unsuccessful";

exit();

39
?>

<tr>

<td><p>PRODUCT NAME:</p></td>

<td>

<input type="textbox" name="prodName" placeholder="Enter your product


name">

<span class="error">* <?php if(!empty($prodNameErr)){echo $prodNameErr;}


?></span>

</td>

</tr>

<tr>

<td><p>DESCRIPTION:</p></td>

<td>

<textarea name="description" rows=10 cols=40></textarea>

<span class="error">* <?php if(!empty($descErr)){echo $descErr;} ?></span>

</td>

</tr>

<tr>

<td><p>PRICE:</p></td>

<td>

<input type="textbox" name="price" placeholder="Enter the starting price of your


product">

<span class="error">* <?php if(!empty($priceErr)){echo $priceErr;} ?></span>

40
</td>

</tr>

<tr>

<td><p>SELLER NAME:</p></td>

<td>

<input type="textbox" name="sellerName" placeholder="Enter seller name">

<span class="error">* <?php if(!empty($sellerNameErr)){echo $sellerNameErr;}


?></span>

</td>

</tr>

<tr>

<td><p>SELLER LOCATION:</p></td>

<td>

<input type="textbox" name="sellerAddress" placeholder="Enter your location">

<span class="error">* <?php if(!empty($sellerAddressErr)){echo


$sellerAddressErr;} ?></span>

</td>

</tr>

<tr>

<td><p>SELLER CONTACT:</p></td>

<td>

<input type="textbox" name="sellerPhone" placeholder="Enter your mobile


number">

41
<span class="error">* <?php if(!empty($sellerPhoneErr)){echo $sellerPhoneErr;}
?></span>

</td>

</tr>

<tr>

<td><input type="submit" name="submit4" value="ADD"></td>

<td><a href="display.php"> <input type="button" name=""


value="CANCEL"></a></td>

</tr>

</table>

</div>

</form>

ADD PRODUCT FORM

<?php

$conn=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn)

echo"";

else

echo"not connected";

42
}

if(isset($_POST['submit4']))

$image=$_POST['image'];

$username=$_POST['username'];

$productadd=$_POST['productadd'];

$description=$_POST['description'];

$price=$_POST['price'];

$date=$_POST['date'];

$sellername=$_POST['sellername'];

$sellerloc=$_POST['sellerloc'];

$sellercontact=$_POST['sellercontact'];

$qu="INSERT INTO productadd


VALUES('".$image."','".$username."','".$productadd."','".$description."','".$price."
','".$date."','".$sellername."','".$sellerloc."','".$sellercontact."')";

$q=mysqli_query($conn,$qu);

if($q)

header("Refresh:0.2; url=myaccount.php");

else

43
echo"unsuccessful";

exit();

?>

<tr>

<td><p>PRODUCT NAME:</p></td>

<td>

<input type="textbox" name="prodName" placeholder="Enter your product


name">

<span class="error">* <?php if(!empty($prodNameErr)){echo $prodNameErr;}


?></span>

</td>

</tr>

<tr>

<td><p>DESCRIPTION:</p></td>

<td>

<textarea name="description" rows=10 cols=40></textarea>

<span class="error">* <?php if(!empty($descErr)){echo $descErr;} ?></span>

</td>

</tr>

<tr>

44
<td><p>PRICE:</p></td>

<td>

<input type="textbox" name="price" placeholder="Enter the starting price of your


product">

<span class="error">* <?php if(!empty($priceErr)){echo $priceErr;} ?></span>

</td>

</tr>

<tr>

<td><p>SELLER NAME:</p></td>

<td>

<input type="textbox" name="sellerName" placeholder="Enter seller name">

<span class="error">* <?php if(!empty($sellerNameErr)){echo $sellerNameErr;}


?></span>

</td>

</tr>

<tr>

<td><p>SELLER LOCATION:</p></td>

<td>

<input type="textbox" name="sellerAddress" placeholder="Enter your location">

<span class="error">* <?php if(!empty($sellerAddressErr)){echo


$sellerAddressErr;} ?></span>

</td>

</tr>

45
<tr>

<td><p>SELLER CONTACT:</p></td>

<td>

<input type="textbox" name="sellerPhone" placeholder="Enter your mobile


number">

<span class="error">* <?php if(!empty($sellerPhoneErr)){echo $sellerPhoneErr;}


?></span>

</td>

</tr>

<tr>

<td><input type="submit" name="submit4" value="ADD"></td>

<td><a href="display.php"> <input type="button" name=""


value="CANCEL"></a></td>

</tr>

</table>

</div>

</form>

MAIL FORM

<?php

use PHPMailer\PHPMailer\PHPMailer;

use PHPMailer\PHPMailer\SMTP;

use PHPMailer\PHPMailer\Exception;

46
require 'PHPMailer-master\src\PHPMailer.php';

require 'PHPMailer-master\src\SMTP.php';

require 'PHPMailer-master\src\Exception.php';

$to = '';

$subject = "Test email";

$message = "

<html>

<head>

<title>Test email</title>

</head>

<body>

<p>This email contains HTML Tags!</p>

<table>

<tr>

<th>Firstname</th>

<th>Lastname</th>

</tr>

<tr>

<td>John</td>

<td>Doe</td>

</tr>

</table>

47
</body>

</html>

";

$mail = new PHPMailer(true); // create a new object

$mail->IsSMTP(); // enable SMTP

//$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages


only

$mail->SMTPAuth = true; // authentication enabled

$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail

$mail->Host = "smtp.gmail.com";

$mail->Port = 465; // or 587

$mail->IsHTML(true);

$mail->Username = "ezhilnanda95@gmail.com";

$mail->Password = "Mphasi$123";

$mail->SetFrom("admin@aucton.com");

$mail->Subject = "Test mail";

$mail->Body = $message;

$conn=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

// Check connection

if($conn === false){

die("ERROR: Could not connect. " . mysqli_connect_error());

48
$query="SELECT * FROM signup2 where UPPER(supervisor)='NO'";

$result = mysqli_query($conn,$query);

if(mysqli_num_rows($result)>0)

while($row = $result->fetch_assoc()) {

$to = $row["email"];

$mail->AddAddress($to);

$to = substr(ltrim(rtrim($to)),0,-1);

mysqli_close($conn);

else

echo"unsuccessful";

mysqli_close($conn);

if(!$mail->Send()) {

echo "Mailer Error: " . $mail->ErrorInfo;

} else

echo "Message has been sent";

49
?>

BID FORM

<?php

$conn=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn === false){

die("ERROR: Could not connect. " . mysqli_connect_error());

$status = 'CREATED';

$bidStartDate = new DateTime();

$bidStartDate->setTimeZone(new DateTimeZone("Asia/Calcutta"));

$bidStartDate->setTime(0, 0);

$date_format1 = $bidStartDate->format('Y-m-d H:i:s');

echo $date_format1.'<br/>';

$bidEndDate = new DateTime();

$bidEndDate->setTimeZone(new DateTimeZone("Asia/Calcutta"));

$bidEndDate->setTime(0, 0);

$bidEndDate->add(new DateInterval('PT23H59M59S'));

$date_format2 = $bidEndDate->format('Y-m-d H:i:s');

echo $date_format2;

$query="SELECT * FROM products WHERE UPPER(bidStatus)='".$status."' and


bidEndDate between '$date_format1' and '$date_format2'";

$result = mysqli_query($conn,$query);

50
if(mysqli_num_rows($result)>0)

while($row = $result->fetch_assoc()) {

echo $row["prodID"].' '.$row["prodName"].' '.'<br/>';

$conn1=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn1 === false){

die("ERROR: Could not connect. " . mysqli_connect_error());

$status = 'Online';

$query1 = "UPDATE products SET bidStatus = '".$status."' WHERE prodID =


".$row["prodID"];

$result1 = mysqli_query($conn1,$query1);

if(!$result1)

echo "Status update unsuccessful"; mysqli_close($conn1);

?>

BIDDING COMPLETED FORM

<?php

$conn=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn === false){

51
die("ERROR: Could not connect. " . mysqli_connect_error());

$query="SELECT * FROM userbid WHERE uname='".$_SESSION["uname"]."'";

$result = mysqli_query($conn,$query);

if(mysqli_num_rows($result)>0)

while($row = $result->fetch_assoc()) {

$prodID = $row["prodID"];

$conn1=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn1 === false){

die("ERROR: Could not connect. " . mysqli_connect_error());

$result1 = mysqli_query($conn1,$query1);

if(mysqli_num_rows($result1)>0)

//Retrieve the successful bidder for the product

while($row1 = $result1->fetch_assoc()) {

if($row1["uname"]===$_SESSION["uname"])

//Check if the successful bidder is the current user

$html_code = '<div class="prodThumb">

<h3>Product Image</h3>

52
'.displayImage($row1["img_id"]).'

<form method="POST" action="productHome.php">

<table>

<tr>

<td><b>Product Name</b></td>

<td>'.$row1["prodName"].'</td>

</tr>

<tr>

<td><b>Product Descriptioon</b></td>

<td>'.$row1["prodDescription"].'</td>

<td>'.$row1["startPrice"].'</td>

</tr>

<tr>

<td><b>Your Bid Amount</b></td>

<td><label>'.$row1["sbidAmount"].'</label></td>

</tr>

<tr>

<td><b>Seller Name</b></td>

<td>'.$row1["sellerName"].'</td>

</tr>

<tr>

<td><b>Winner</b></td>

53
<td><span style="color: red; font-style: italic;">Congratulations. You are the
winner.</span></td>

</table></form></div>

';

echo $html_code;

else

//Successful bidder is not the current user

$sAmount = 0;

$conn5=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn5 === false){

die("ERROR: Could not connect. " . mysqli_connect_error())

$query5 = "SELECT * FROM userbid where uname = '".$_SESSION["uname"]."' and


prodID = ".$prodID;

$result5 = mysqli_query($conn5,$query5);

if(mysqli_num_rows($result5)>0)

$row5 = $result5->fetch_assoc();

//var_dump($row5);

$sAmount = $row5["bidAmount"];

54
mysqli_close($conn5);

$html_code = '<div class="prodThumb">

<h3>Product Image</h3>

'.displayImage($row1["img_id"]).'

<form method="POST" action="productHome.php">

<table>

<tr>

<td><b>Product Name</b></td>

<td>'.$row1["prodName"].'</td>

</tr>

<tr>

<td><b>Product Descriptioon</b></td>

<td>'.$row1["prodDescription"].'</td>

</tr>

<tr>

<td><b>Starting Price</b></td>

<td>'.$row1["startPrice"].'</td>

</tr>

<tr>

<td><b>Winner Bid Amount</b></td>

<td><label>'.$row1["sbidAmount"].'</label></td>

</tr>

55
<tr>

<td><b>Your Bid Amount</b></td>

<td><label>'.$sAmount.'</label></td>

</tr>

<tr>

<td><b>Seller Name</b></td>

<td>'.$row1["sellerName"].'</td>

</tr>

<tr>

<td><b>Winner</b></td>

<td>'.$row1["uname"].'</td>

</tr>

</table></form></div>

';

echo $html_code;

else

//No bidders for the product

$conn4=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

56
if($conn4 === false){

die("ERROR: Could not connect. " . mysqli_connect_error());

$query4="SELECT * FROM products WHERE prodID=".$prodID;

$result4 = mysqli_query($conn4,$query4);

if(mysqli_num_rows($result4)>0)

//Retrieve the successful bidder for the product

while($row4 = $result4->fetch_assoc()) {

$html_code = '<div class="prodThumb">

<h3>Product Image</h3>

'.displayImage($row4["img_id"]).'

<form method="POST" action="productHome.php"

<table>

<tr>

<td><b>Product Name</b></td>

<td>'.$row4["prodName"].'</td>

</tr>

<tr>

<td><b>Product Descriptioon</b></td>

<td>'.$row4["description"].'</td>

</tr>

57
<tr>

<td><b>Starting Price</b></td>

<td>'.$row4["price"].'</td>

</tr>

<tr>

<td><b>Seller Name</b></td>

<td>'.$row4["sellerName"].'</td>

</tr>

<tr>

<td><b>Winner</b></td>

<td>No successful bidder</td>

</tr>

</table></form></div>

echo $html_code;

mysqli_close($conn1);

mysqli_close($conn);

else

58
echo '<div style="width: auto; height: auto; background-color: white; padding:
15px;">

Thank you. We did not find any items you had succeefully bid so far.

</div>';

mysqli_close($conn);

return;

function displayImage($id)

$conn2=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

// our sql query

$sql2 = "SELECT * from prodImage where id = ".$id;

// insert the image

$result2 = mysqli_query($conn2, $sql2) or die("Error in Query: " . mysql_error());

while($row2 = mysqli_fetch_array($result2))

return '<img src="data:image;base64,'.base64_encode($row2["image"]).'" />';

?>

MY ACCOUNT FORM

<?php

include('mainNav.php');

?>

59
<div class="content">

<h3>Update Profile</h3>

<table>

<?php

$conn=mysqli_connect('localhost','root','db$123','signup')or die(mysqli_error());

if($conn === false){

die("ERROR: Could not connect. " . mysqli_connect_error());

$query="SELECT * FROM signup2 WHERE uname='".$_SESSION["uname"]."'";

$result = mysqli_query($conn,$query);

if(mysqli_num_rows($result)>0)

while($row = $result->fetch_assoc()) {

while($counter=key($row))

switch ($counter) {

case 'fname':

<tr>

<td><b>First Name</b></td>

<td>'.$row[$counter].'</td>

</tr>

';

60
break;

case 'lname':

echo '

<tr>

<td><b>Last Name</b></td>

<td>'.$row[$counter].'</td>

</tr>

';

break;

case 'email':

<tr>

<td><b>Email</b></td>

<td>'.$row[$counter].'</td>

</tr>

';

break;

case 'mob':

echo '

<tr>

<td><b>Mobile</b></td>

<td>'.$row[$counter].'</td>

</tr>

61
';

break;

next($row);

mysqli_close();

?>

CHAPTER-5

5. TESTING AND IMPLEMENTATION


5.1 INTRODUCTION TO TESTING

Software testing is the process of executing a program or system with the intent
of finding errors. Or it involves any activity aimed at evaluating an attribute or
capability of a program and determines that it meets its required results.
Software can fail in many different ways.

Testing helps in verifying and validating whether the software is working as it is


intended to be working. Testing should systematically uncover different classes of
errors in a minimum amount of time with a minimum amount of efforts.

62
5.2 TYPES OF TESTING USED

Testing is divided into several distinct operations:

 UNIT TESTING
Unit test comprises of a set tests performed by an individual program prior
to the integration of the unit into large system. A program unit is usually
the smallest free functioning part of the whole system. Module unit testing
should be as exhaustive as possible to ensure that each representation
handled by each module has been tested.

UNIT CASE-1

Name of test Login test

Item being tested Test for valid bidder/seller/admin

Sample Input Enter wrong username and password

Expected Output Username and password required

Actual Output Same as expected output

Result Successful

UNIT CASE-2

63
Name of test Sign Up/Sign In test

Item being tested Test for valid user’s data

Sample Input Enter wrong user details

Expected Output Correct user details required

Actual Output Same as expected output

Result Successful

VALIDATION TESTING

After validation testing, software is completely assembled as a package,


interfacing errors that have been uncovered and final series of software test; the
validation test begins. Steps taken during software design and testing can greatly
improve the probability of successful integration in the larger system.

CHAPTER-6
CONCLUSION
Online auction system project is a website which is developed in PHP
for helping users to sell products through online and fix rates based on
bidding procedure. This project also contains different categories. In
present fast growing technology and software world web application are
playing important role in increasing business mainly online purchase
related websites are growing fast in every field. Considering present
trend this online auction system website is developed to help users to
sell products based on live bid. The bidding process can be conducted on
a global scale.
64
FUTURE ENHANCEMENT
“Online auction system” project give option to sell and purchase a
product at online and bid different kinds of auction items. At this
time every person has shortage of time so user can sell and
purchase at online by using this website.
In future we will browse many category for bidding we create a
mobile application forbidding which is used in mobile, tablet and
another technology devices. Better customer services like online
payment facility.

65
BIBLIOGRAPHY
ONLINE RESOURCES
 https://www.w3schools.com/php/default.asp
 https://en.m.wikipedia.org/wiki/software
 https://en.m.wikipedia.org/wiki/HTML
 https://www.w3schools.com/sql/default.asp

66
67
68
69

You might also like