Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 67

VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELAGAVI

A mini Project report on

“Farmers agro Products Shopping”


Submitted in partial fulfilment of the requirements for the 5th sem DBMS lab

BACHELOR OF ENGINEERINGING
IN
COMPUTER SCIENCE AND
ENGINEERING BY
Chandan Yadav ks
( 1SP20CS013)
Under the guidance
Of
Asst.Professor

Mrs.SushmaB.A

Dept. of CSE

Department of Computer Science and Engineering

S.E.A.COLLEGE OF ENGINEERING AND


TECHNOLOGY BENGALURU-560049
2022-23
S.E.A COLLEGE OF ENGINEERING AND TECHNOLOGY
EktaNagar, Basavanpura, Virgonagar Post, K.R.Puram, Bengaluru, Karnataka 560059

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE
This is to certify the project work entitled “ONLINE NEWS PORTAL” has been
successfully carried out by Chandan Yadav ks bearing USN 1SP20CS013 of V sem in partial
fulfilment for the award of Bachelor of Engineering in Computer Science and Technology
of the Visvesvaraya Technological University, Belgaum during the year 2023.The project
report has been approved as it satisfied the academic requirement in respect of the mini project
work prescribed for Bachelor of Engineering.

Signature of Co-ordinator Signature of HOD


Mrs.Sushma B.A Dr.B.Loganayagi
Dept. of CSE Dept. of CSE

Signature of Internal Examiner Signature of External Examiner


ACKNOWLEDGEMENT

Firstly, I thank the Management late Shri A Krishnappa, Chairman SEA College of
Engineering and Technology for Providing Necessary infrastructure and creating good
environment.
I would like to express my profound thanks to our respected principal
Dr. B VENKATANARAYANA for the encouragement and support given by him.

I would like to express my sincere thanks to our respected Dr. Dr.B.LOGANAYAGI , HOD
OF COMPUTER SCIENCE AND ENGINEERING department, for her assistance and
guidance.

I am thankful for the support rendered by my Project guide and coordinator Mrs.Sushma B.A for
her valuable suggestions.

I am also obliged, to the faculty members of CSE Department who rendered their valuable
assistance for the Project.

And, I would like to express my heart full gratitude to my parents who have extended their help
throughout my Project.

And finally, I would like to express my heart full gratitude to my friends and all those who have
extended their help throughout my Project.

Chandan Yadav ks
(1SP20CS013)
Abstract

Farmer’s agro products shopping

Farmer’s agro products shopping website is a farmer and customer website.

It’s is website which runs on web browser i.e., Google chrome, Microsoft edge.

This website is developed in bracket code editor or Visual Studio code editor as a
front end software.

The programming language used for developing these agro products shopping is
MYSQL, HTML, CSS, JavaScript, Php.

These website is a object oriented and dynamic website and functionality of agro
products shopping is implemented by javascript.

The backend software ie., used to website is xammp control panel,apache


which helps the website to run on web browser. Whereas SQL which stores
the data collected from website using in the form of database table.

All the modules in these agro products shopping helps the farmer and customer
to sell and purchase the agro products from farmer to buyer.

These website is the both admin(farmer) and client (buyer) side. These website
is user friendly and expandable.

It covers all modules for farmer ie., farmer login,register page,upload product
page,our products page to know about farmer products.

Similarly has all modules for buyer i.e buyer login,register page,search product
page,buy now page.
Contents
Chapter -1 Introduction (Explanation about the project).
Chapter -2 System Analysis-Photo.
Chapter -3 Software Requirement Specification.
3.1 Existing System.
3.2 Proposed System.
3.3 Requirement Specification.
3.31 About the technologies used.
3.32 Hardware and Software
Requirement. Chapter -4 System Design
4.1 Architecture (Overall Project architecture)
4.2 DFD
4.3 ER Diagram
4.4 Database Design (Tables)
Chapter -5 Implementation (Coding of home page).
Chapter -6 Testing
6.1 About testing (1 page).
6.2 Types of Testing (2 Pages).
6.3 Test Cases (for validation)
Photo. Chapter -7 Screen Shots.
Chapter -8 Future
Enhancement. Chapter -9
Conclusion.
Chapter -10 Bibliography.
1. INTRODUCTION

This project is about sales of agro products by farmer (seller) and purchase of those
agro products by buyer, through our website. Without the need of middleman Agro
products shopping website is a farmer and customer website

Farmers agro products shopping

Farmers agro products shopping website is a farmer and customer

website. It’s is website which runs on web browser i.e Google

chrome,Microsoft edge.

These website is developed in bracket code editor or Visual Studio code editor as a
font end software.

The programming language used for developing these agro products shopping is
MYSQL,HTML,CSS,JavaScript

These website is a object oriented and dynamic website and functionality of agro
products shopping is implemented by javascript.

The backend software ie., used to website is xammp control panel,apache which helps
the website to run on web browser. Whereas SQL which stores the data collected from
website using in the form of database table.

All the modules in these agro products shopping helps the farmer and customer to sell
and purchase the agro products from farmer to buyer.

These website is the both admin(farmer) and client (buyer) side. These website is user
friendly and expandable.
It covers all modules for farmer ie., farmer login,register page,upload product page,our
products page to know about farmer products. Similarly has all modules for buyer i.e
buyer login,register page,search product page,buy now page.

> Due to involvement of middleman farmers not getting a reasonable price in offline
market so can they switch to online and earn..

>Farmers hard grown agro products like groundnuts, corn, grains, cereals,

etc should not get spoil and get wasted.

>So those agro products should get sold and farmers should get income.

>And we got an idea that farmers can directly upload the agro products in our
website.
> Due to involvement of middleman farmers not getting a reasonable price in
offline market so can they switch to online and earn..

>Farmers hard grown agro products like groundnuts, corn, grains, cereals,

etc should not get spoil and get wasted.

>So those agro products should get sold and farmers should get income.

>And we got an idea that farmers can directly upload the agro products in our
website.

>Even customers can directly purchase those agro products.

1|Page
2. System Analysis

Definition:
System Analysis is the detailed study of the various operations performed by the
system and their relationships within and outside the system. Analysis is the process
of breaking something into its parts so that the whole may be understood. System
analysis is concerned with becoming aware of the problem, identifying the relevant
and most decisional variables, analyzing a synthesizing the various factors and
determining an optimal or at least a satisfactory solution. During this, a problem is
identified, alternate system solutions are studied and recommend tic be made about
committing the resources used to design the system.

2|Page
Farmer’s Agro Product Shopping

Feasibility Study

A feasibility analysis usually involves a thorough assessment of the operational


need). Financial and technical aspects of a proposal. Feasibility study is the test of the
system proposal made to identify whether the user needs may be satisfied using the
current Software and Hardware technologies, whether the system will be cost
effective from a business point of view and whether it can be developed with the
given budgetary constraints. A feasibility study should be relatively cheap and done
at the earliest possible time. Depending on the study, the decision is made whether to
go ahead with a more detailed analysis. When a new project is proposed, it normally
goes through feasibility assessment Feasibility study is carried out to determine
whether the proposed system is possible to develop with available resources and what
should be the cost consideration. Facts considered in the feasibility analysis were.
Technical
Feasibility
Economic
Behaviora
l

Feasibility

3|Page
Farmer’s Agro Product Shopping

Technical Feasibility
Technical Feasibility deals with the hardware as well as software requirements.
Technology is not a constraint to type system development. We have to find out whether
the necessary technology, the proposed equipment’s have the capacity to hold the data,
which is used in the project, should be checked to carry out this technical feasibility.

This software is running in windows 2000 Operating System, which can be easily

installed. The hardware required is Pentium based server.

The system can be expanded.

Economic Feasibility
Economic Feasibility This feasibility study present tangible and intangible benefits from
the prefect by comparing the development and operational cost. The technique of cost
benefit analysis is often used as a basis for assessing economic feasibility. This system
needs some initial investment than the existing system, but it can be justifiable that it
will improve quality of service. Thus, feasibility study should center along the following
points:

Improvement resulting over the existing method in terms of accuracy, timeliness

Cost comparison

Estimate on the life expectancy of the hardware

Overall objective.

Our project is economically feasible. It does not require much cost to be involved in the
overall process. The overall objectives are in casing out the requirement processes.
Behavioral/ Operational Feasibility

This analysis involves how it will work when it is installed and the assessment of
political and managerial environment in which it is implemented. People are inherently
resistant to change and computers have been known to facilitate change. The new
proposed system is very much useful to the useful to the users and there for it will accept
broad audience from around the world.
3. SOFTWARE REQUIREMENT ANALYSIS

3.1 Existing System:


The existing system required maintenance and tech support very frequently, this ultimately
increased the expenditure for maintaining the software. The existing system also faced a
problem with response time and had a lot of server information delay from each floor
due to creating the system with a coding language, which was not concerned with
interactivity. Hence proving the system Obsolete.

In such systems, there is middleman b/w farmer (seller) and buyer.


It means customer has to purchase from farmer(seller) in which middleman is involved
and gains more profit.
Example: In eBay and big basket this website is free to use for buyers, but
sellers(farmers)are
charged fees for listing items after a limited number of free listings, and again when
those items are sold.

Limitations of Existing System:


1. HighMaintenae
2.TimeConsumig
3.Expensive

3.2 Proposed System:


The Proposed System is a well-developed web application created using latest windows
based application software and front-end Visual Studio Code editor and the back-end as
Xampp control panel MY-SQL Database and Apache server. The existing system faced
issues like interactivity and high maintenance, which is minimal in the Proposed System.
The Proposed System has a duality of functions, as it is a Hybrid System, as it helps in
agro products shopping as well as acts an information displaying system for customers
displaying information about which seller sold

Features of Proposed System:


1. Login is provided for both seller (farmer) and buyer and there is no login for
middleman.
Buyer can place all orders directly from seller (farmer).
2. Order details will be there for both buyer and seller, after the buyer has placed
order.
3. Compatible to desktop and laptop.
4. In E learning tab In learning tab, suggested videos will be embedded, interested
farmers can learn more on farmers through these suggested videos
5. Total price is calculated by multiplying price and amount of product
Modules:

1. Register:
Register is provided for both seller and buyer.
It has attributes like username, password, email id , phone number ,address.
2.Login:
Login is provided for both seller and
buyer. It has attributes like username
and password. 3.Digital market:
It has 4buttons like my profile, search, our products ,order
details 4.My profile:
It has 2 upload button and logout button and has personal details of both seller
and buyer. 5.Search:
It has list of products uploaded by seller for searching.
6.Our products:
It has list of products uploaded by seller for his reference.
7.Order details:
It has details of which seller sold which product to which buyer.
8.Upload product:
It has 1button like upload button to upload images and has category dropdown menu
to select product category
2textbox like description box to give details of product and price textbox to price per
unit 9.Review:
It has description box to write review of product. It has drop menu to give rating
from 1 to 10 10.Buy Now:
It has details of buyer, quantity of product, total amount of product.
11.E learning Tab:
In learning tab, suggested videos will be embedded, interested farmers can learn
more on farming through these suggested videos
Farmer’s Agro Product Shopping

3.3 Requirement Specification:

Here the focus is on specifying what has been found in the process of analysis such as
representation, specification languages and tools and also checking the requirement phase,
terminates with the production of the validate SRS document, producing the SRS
document is the basic goal of this place.

3.31 About the technologies used

o Backend:
o 1. Xampp control panel: (local host where we can write php code for connection with
database )
o 2. Mysql: (backend storage media to store in database) o 3. Apache: (server to execute or
host website on web server) o Frontend:
Visual studio code editor

o Programming language used:


html, css, javascript, bootstrap

3.32 Hardware and Software Requirements


FARMERS AGRO PRODUCTS

4. SYSTEM DESIGN

4.1 Architecture
FARMERS AGRO PRODUCTS

4.2 Data Flow Diagram

A data flow is a graphical technique that describes information flow and transforms
that are applied as
data move from input to output. The DFD is also known as data flow graphs or bubble
sort.

Components of Data Flow Diagram

There are four symbols are used in the drawing of Data Flow Diagrams, namely:

Entities

External entities represent the sources of data that enter the system or the recipients of data that
leave the system.

Process

Processes represent data in which data is manipulated by being stored, retrieved, or


transformed in some way. A circle represents it. The process will show the data information or
charge.

Database

Database represents storage of data within the system.

Data Flow
FARMERS AGRO PRODUCTS

DATA FLOW DIAGRAM LEVEL ONE

4.3 ER DIAGRAM
FARMERS AGRO PRODUCTS

In software engineering, an entity relationship model is an abstract and conceptual


representation of data. Entity relationship modeling is a database modeling method,
used to produce a type of conceptual schema or semantic data model of a system,
often a relational database, and its requirements a top-down fashion. Diagrams created
by this process are called entity relationship, ER diagrams for ERD’s.

The result is a series of diagrams that represent the business activities in a way that is
clear and easy to communicate. As business model comprises one or more data flow
diagrams. Initially a context diagram is drawn, which is simple representation of the
entire system under investigation.

Entity Relationship Diagram Symbols:

ENTITY
FARMERS AGRO PRODUCTS
FARMERS AGRO PRODUCTS

4.4 Database Design (Tables)


Farmer

Buyer
FARMERS AGRO PRODUCTS

Farmer Product
FARMERS AGRO PRODUCTS

Transaction
FARMERS AGRO PRODUCTS
FARMERS AGRO PRODUCTS

Review
FARMERS AGRO PRODUCTS

5. CODING

Implementation is the process of converting a new or a revised system design into


an operational one. The objective is to put the new or revised system that has
been tested into operation while holding costs, risks, and personal irritation to the
minimum. A critical aspect of the implementation process is to ensure that there
will be no disrupting the functioning of the organization. The best method for
gaining control while implanting any new system would be to use well planned
tests for testing all new programs. Before production files are used to test live
data, text files must be created on the old system, copied over to the new system,
and used for the initial test of each program.

Another factor to be considered in the implementation phase is the acquisition of


the software and hardware. Once the software is developed for the system and
testing is carried out, it is then the process of making the newly designed system
fully operational and consistent in performance.
.

Home page
<?php session_start(); ?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Agroproducts shopping</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
FARMERS AGRO PRODUCTS

<meta name="description" content="" />


<meta name="keywords" content="" />
<link href="bootstrap\css\bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.
js"></script>
<script src="bootstrap\js\bootstrap.min.js"></script>
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" href="login.css"/>
<script src="js/jquery.min.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/skel-layers.min.js"></script>
<script src="js/init.js"></script>
<noscript>
<link rel="stylesheet" href="css/skel.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-xlarge.css" />
</noscript>
<link rel="stylesheet" href="indexfooter.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
</head>

<?php require
'menu.php';
?>

<!-- Banner -->


<section id="banner" class="wrapper" >
<div class="container" style="background-color:green;">
FARMERS AGRO PRODUCTS

<h2>Agroproducts shopping</h2>
<p>Your Product Our Market</p>
<br><br>
<center>
<div class="row uniform">
<div class="6u 12u$(xsmall)">
<button class="button fit" onclick="document.getElementById
('id01').style.display='block'" style="width:auto">LOGIN</button>
</div>

<div class="6u 12u$(xsmall)">


<button class="button fit" onclick="document.getElementById
('id02').style.display='block'" style="width:auto">REGISTER</button>
</div> </div>
</center>

</section>

<!-- One -->


<section id="one" class="wrapper style1 align-center">
<div class="container">
<header>
<h2>AgroCulture</h2>
<p>Explore the new way of trading...</p>
</header>
<div class="row 200%">
<section class="4u 12u$(small)">
<i class="icon big rounded fa-clock-o"></i>
FARMERS AGRO PRODUCTS

<p>Digital Market</p>
</section>
<section class="4u 12u$(small)">
<i class="icon big rounded fa-comments"></i>
<p>AgroProducts shopping</p>
</section>
<section class="4u$ 12u$(small)">
<i class="icon big rounded fa-user"></i>
<p>Register with us</p>
</section>
</div>
</div>
</section>

<!-- Footer -->


<footer class="footer-distributed" style="background- color:black"
id="aboutUs">

<center>
<h1 style="font: 35px calibri;">About Us</h1>
</center>
<div class="footer-left">
<h3 style="font- family: 'Times New Roman',
cursive;">AgroCulture &copy; </h3>
<!-- <div class="logo">
<a href="index.php"><img src="images/logo.png" width="200px"></
a>
</div>-->
<br />
FARMERS AGRO PRODUCTS

<p style="font-size:20px;color:white">Your product Our market !!!</p>


<br />
</div>

<div class="footer-center">
<div>
<i class="fa fa-map-marker"></i>
<p style="font-
size:20px">Agro Culture Fam<span>Vormir</span></p>
</div>
<div>
<i class="fa fa-phone"></i>
<p style="font-size:20px">123456789</p>
</div>
<div>
<i class="fa fa-envelope"></i>
<p style="fontsize:20px"><a href="mailto:agroculture@gmail.com"
style="color:white">demo@demo.com</a></p>
</div>
</div>

<div class="footer-right">
<p class="footer-company-about" style="color:white">
<span style="font-size:20px"><b>About AgroCulture</b></span>
AgroCulture is e-commerce trading platform for grains & grocerries...
</p>
<a href="#"><i style="margin-left: 0;margin-top:5px" class="fa fa-
instagram"></i></a>
FARMERS AGRO PRODUCTS

<a href="#"><i style="margin-left: 0;margin-top:5px" class="fa fa-


youtube"></i></a>
</div>
</div>

</footer>

<div id="id01" class="modal">

<form class="modal- content animate"


action="Login/login1.php" method='POST'>
<div class="imgcontainer">
<span onclick="document.getElementById('id01').style.display='none'" class
="close" title="Close Modal">&times;</span>
</div>
<div class="container">
<h3>Login</h3>
<form method="post" action="Login/login1.php">
<div class="row uniform 50%">
<div class="7u$">
<input type="text" name="uname" id="uname" value="
" placeholder="UserName" style="width:80%" required/>
</div>
<div class="7u$">
<input type="password" name="pass" id="pass"
value= "" placeholder="Password" style="width:80%" required/>
</div>
</div>
FARMERS AGRO PRODUCTS

<div class="row uniform">


<p>
<b>Category : </b>
</p>
<div class="3u 12u$(small)">
<input type="radio" id="farmer" name="category" v

alue="1" checked>

<label for="farmer">Farmer</label>

</div>

<!-- <div class="3u 12u$(small)">

<input type="radio" id="buyer" name="category" val

ue="0">

<label for="buyer">Buyer</label>
</div> -->
</div>
<center>

<div class="row uniform">


<div class="7u 12u$(small)">

<input type="submit" value="Login" />

</div>

</div>

</center>
</div>
FARMERS AGRO PRODUCTS

</form>

</section>
</div>
</div>
</div>
</form>
</div>

<div id="id02" class="modal">

<form class="modal- content animate" method="post"


action="Login/signUp1.php" >
<div class="imgcontainer">
<span onclick="document.getElementById('id02').style.display='none'" class
="close" title="Close Modal">&times;</span>
</div>

<div class="container">

<section>

<h3>SignUp</h3>
<form method="post" action="Login/signUp1.php">
<center>
<div class="row uniform">
<div class="3u 12u$(xsmall)">
<input type="text" name="name" id="name" value=""
placeholder="Name" required/>
FARMERS AGRO PRODUCTS

</div>
<div class="3u 12u$(xsmall)">
<input type="text" name="uname" id="uname" value="
" placeholder="UserName" required/>
</div>
</div>
<div class="row uniform">
<div class="3u 12u$(xsmall)">
<input type="text" name="mobile" id="mobile" value=
"" placeholder="Mobile Number" required/>
</div>

<div class="3u 12u$(xsmall)">


<input type="email" name="email" id="email" value="
" placeholder="Email" required/>
</div>
</div>
<div class="row uniform">
<div class="3u 12u$(xsmall)">
<input type="password" name="password" id="passwo
rd" value="" placeholder="Password" required/>
</div>
<div class="3u 12u$(xsmall)">
<input type="password" name="pass" id="pass"
value= "" placeholder="Retype Password" required/>
</div>
</div>
<div class="row uniform">
FARMERS AGRO PRODUCTS

<div class="6u 12u$(xsmall)">


<input type="text" name="addr" id="addr" value="" pla
ceholder="Address" style="width:80%" required/>
</div> </div>
<div class="row uniform">
<p>
<b>Category : </b>
</p>
<div class="3u 12u$(small)">
<input type="radio" id="buyer" name="category" value

="1" checked>

<label for="buyer">buyer</label>
</div>

</div>
<div class="row uniform">
<div class="3u 12u$(small)">
<input type="submit" value="Submit" name="submit"
class="special" /></li>
</div>

</div>
</center>
</form>
</section>

</div>
FARMERS AGRO PRODUCTS

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

<script> // Get the modal


var modal = document.getElementById('id01');

// When the user clicks anywhere outside of the modal, close it window.onclick =
function(event) { if (event.target == modal) {
modal.style.display = "none";
}
}

var modal1= document.getElementById('id02');

// When the user clicks anywhere outside of the modal, close it window.onclick =
function(event) {
if (event.target == modal1) {
modal1.style.display = "none";
}
}

</script>

</body>
</html>
FARMERS AGRO PRODUCTS

Login page
<?php
session_start();

$user = dataFilter($_POST['uname']);
$pass = $_POST['pass'];
$category = dataFilter($_POST['category']);

require '../db.php';

if($category == 1)
{
$sql = "SELECT * FROM farmer WHERE fusername='$user'";
$result = mysqli_query($conn, $sql);
$num_rows = mysqli_num_rows($result);

if($num_rows == 0)
{
$_SESSION['message'] = "Invalid User Credentialss!"; header("location:
error.php");
}

else

{
$User = $result->fetch_assoc();
FARMERS AGRO PRODUCTS

if (password_verify($_POST['pass'], $User['fpassword']
{
$_SESSION['id'] = $User['fid'];
$_SESSION['Hash'] = $User['fhash'];
$_SESSION['Password'] = $User['fpassword'];
$_SESSION['Email'] = $User['femail'];
$_SESSION['Name'] = $User['fname'];
$_SESSION['Username'] = $User['fusername'];
$_SESSION['Mobile'] = $User['fmobile'];
$_SESSION['Addr'] = $User['faddress']; $_SESSION['Active'] =
$User['factive'];
$_SESSION['picStatus'] = $User['picStatus'];
$_SESSION['picExt'] = $User['picExt'];
$_SESSION['logged_in'] = true;
$_SESSION['Category'] = 1;
$_SESSION['Rating'] = 0;

if($_SESSION['picStatus'] == 0)
{
$_SESSION['picId'] = 0;
$_SESSION['picName'] = "profile0.png";
} else
{
$_SESSION['picId'] = $_SESSION['id'];
$_SESSION['picName'] = "profile".$_SESSION['picId'].".".$_SESSI
ON['picExt'];
}
FARMERS AGRO PRODUCTS

//echo $_SESSION['Email']." ".$_SESSION['Name'];

header("location: profile.php");
} else
{
//echo mysqli_error($conn);
$_SESSION['message'] = "Invalid User Credentials!"; header("location:
error.php");
}
}}
else
{

$sql = "SELECT * FROM buyer WHERE busername='$user'";


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

if($num_rows == 0)
{
$_SESSION['message'] = "Invalid User Credentialss!"; header("location:
error.php");
}

else

{
$User = $result->fetch_assoc();

if (password_verify($_POST['pass'], $User['bpassword']))
{
FARMERS AGRO PRODUCTS

$_SESSION['id'] = $User['bid'];
$_SESSION['Hash'] = $User['bhash'];
$_SESSION['Password'] = $User['bpassword'];
$_SESSION['Email'] = $User['bemail'];
$_SESSION['Name'] = $User['bname'];
$_SESSION['Username'] = $User['busername'];
$_SESSION['Mobile'] = $User['bmobile'];
$_SESSION['Addr'] = $User['baddress']; $_SESSION['Active'] =
$User['bactive'];
$_SESSION['logged_in'] = true;
$_SESSION['Category'] = 0;

//echo $_SESSION['Email']." ".$_SESSION['Name'];

header("location: profile.php");
} else { //echo
mysqli_error($conn);

$_SESSION['message'] = "Invalid User Credentials!"; header("location:


error.php");
}
}
}

function dataFilter($data)
{
$data = trim($data);
FARMERS AGRO PRODUCTS

$data = stripslashes($data); $data =


htmlspecialchars($data); return $data;
}

?>

Register page(Signup page)

<?php
session_start();

if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$name = dataFilter($_POST['name']);
$mobile = dataFilter($_POST['mobile']);
$user = dataFilter($_POST['uname']);
$email = dataFilter($_POST['email']);
$pass = dataFilter(password_hash($_POST['pass'], PASSWORD_BCRYPT));
$hash = dataFilter( md5( rand(0,1000) ) );
$category = dataFilter($_POST['category']);
$addr = dataFilter($_POST['addr']);

$_SESSION['Email'] = $email;
$_SESSION['Name'] = $name;
$_SESSION['Password'] = $pass;
$_SESSION['Username'] = $user;
$_SESSION['Mobile'] = $mobile;
FARMERS AGRO PRODUCTS

$_SESSION['Category'] = $category;
$_SESSION['Hash'] = $hash;
$_SESSION['Addr'] = $addr;
$_SESSION['Rating'] = 0;
}

require '../db1.php';

$length = strlen($mobile);

if($length != 10)
{
$_SESSION['message'] = "Invalid Mobile Number !!!";
header("location: error.php"); die();
}

if($category == 1)
{
$sql = "SELECT * FROM farmer WHERE femail='$email'";

$result = mysqli_query($conn, "SELECT * FROM farmer WHERE femail='$


email'") or die($mysqli->error());

if ($result->num_rows > 0 )
{
$_SESSION['message'] = "User with this email already exists!";
FARMERS AGRO PRODUCTS

//echo $_SESSION['message']; header("location:


error.php");
} else
{
$sql = "INSERT INTO farmer (fname, fusername, fpassword, fhash, fmobil
e, femail, faddress)
VALUES ('$name','$user','$pass','$hash','$mobile','$email','$addr')";

if (mysqli_query($conn, $sql))
{
$_SESSION['Active'] = 0;
$_SESSION['logged_in'] = true;

$_SESSION['picStatus'] = 0;
$_SESSION['picExt'] = png;

$sql = "SELECT * FROM farmer WHERE fusername='$user'";


$result = mysqli_query($conn, $sql);
$User = $result->fetch_assoc();
$_SESSION['id'] = $User['fid'];

if($_SESSION['picStatus'] == 0) {
$_SESSION['picId'] = 0;
$_SESSION['picName'] = "profile0.png";
} else
{
$_SESSION['picId'] = $_SESSION['id'];
FARMERS AGRO PRODUCTS

$_SESSION['picName'] = "profile".$_SESSION['picId'].".".$_SESSI
ON['picExt'];
}

$_SESSION['message'] =

"Confirmation link has been sent to $email, please verify your


account by clicking on the link in the message!";

$to = $email;
$subject = "Account Verification ( ArtCircle.com )";
$message_body = "
Hello '.$user.',

Thank you for signing up!

Please click this link to activate your account:


http://localhost/AgroCulture/Login/verify.php?email=".$email."&hash=".
$hash;

//$check = mail( $to, $subject, $message_body );

header("location: profile.php");
}
else
{
FARMERS AGRO PRODUCTS

//echo "Error: " . $sql . "<br>" . mysqli_error($conn);


$_SESSION['message'] = "Registration failed!"; header("location:
error.php");
}
}
}

else

{
$sql = "SELECT * FROM buyer WHERE bemail='$email'";

$result = mysqli_query($conn, "SELECT * FROM buyer WHERE bemail='$e


mail'") or die($mysqli->error());

if ($result->num_rows > 0 ) {
$_SESSION['message'] = "User with this email already exists!";
//echo $_SESSION['message'];
header("location: error.php");
} else
{
$sql = "INSERT INTO buyer (bname, busername, bpassword, bhash, bmob
ile, bemail, baddress)
VALUES ('$name','$user','$pass','$hash','$mobile','$email','$addr')";

if (mysqli_query($conn, $sql))
{
$_SESSION['Active'] = 0;
$_SESSION['logged_in'] = true;
FARMERS AGRO PRODUCTS

$sql = "SELECT * FROM buyer WHERE busername='$user'";


$result = mysqli_query($conn, $sql);
$User = $result->fetch_assoc();
$_SESSION['id'] = $User['bid'];

$_SESSION['message'] =

"Confirmation link has been sent to $email, please verify your


account by clicking on the link in the message!";

$to = $email;
$subject = "Account Verification ( ArtCircle.com )";
$message_body = "
Hello '.$user.',
Thank you for signing up!

Please click this link to activate your account:

http://localhost/AgroCulture/Login/verify.php?email=".$email."&hash=".
$hash;

//$check = mail( $to, $subject, $message_body );

header("location: profile.php");
FARMERS AGRO PRODUCTS

}
else
{
//echo "Error: " . $sql . "<br>" . mysqli_error($conn);
$_SESSION['message'] = "Registration not
successfull!"; header("location: error.php");
}
}
}

function dataFilter($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
6. TESTING

INTRODUCTION

Testing is the major process involved in software quality assurance (QA). is


iterative Here test data is prepared and is used to test the modules individually.
System testing sure that all components or the system function properly as a unit
by actually forcing the system to fail.
FARMERS AGRO PRODUCTS

The test causes should be planned before testing begins. Then as the testing
progresses, testing shifts
focus in an attempt to find errors in integrated clusters of modules. The
philosophy behind testing is to find errors. Actually, testing is the state of
implementation that is aimed at ensuring that the system works actually and
efficiently before implementation.

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. The procedure level testing is made first. By giving improper inputs,
the errors occurred are noted and eliminated. Thus, the system testing is a
confirmation that all is correct and an opportunity to show the user that the
system works. Ille 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 test" to uncover that only the end user seems able to find.

This is the final Step in system life cycle. Here we implement the tested errorfree
system into real-life environment and make necessary changes, which runs in an
online fashion. Here system maintenance is done every months or year based on
company policies, and is checked for errors like runtime errors, long run errors
and other maintenances like table verification and During the requirement
analysis and design, the output is a document that is usually textual and non-
executable. After the coding phase, computer programs are available that can be
executed for testing purpose. This implies that testing not only has to uncover
errors introduced during coding, but also errors introduced during the previous
phases.
FARMERS AGRO PRODUCTS

Types of testing

1. Unit testing
2.Integration testing
3.System testing

1. Unit testing

Unit testing verification efforts on the smallest unit of software design, module.
This is known as “Module Testing". The modules are tested separately. This
testing is carried out during stage itself. In these testing Steps, each module is
found to be working satisfactorily as regard to the expected output from the
module.

2. Integration testing

Integration testing is a systematic technique for constructing tests to uncover


error within the interface. In the project, all the modules are combined and then
the entire is tested as a whole. In the integration- testing Step, all the error
uncovered is corrected for the next testing steps.

3. System testing

Once individual module testing completed, modules are assembled to perform as


a system. Then the topdown testing, which begins from upper level to lower level
module testing, to done to check whether the entire system is performing
satisfactorily. After unit and integration testing are over then the system as whole
is tested. There are two general strategies for system testing.
They are:
FARMERS AGRO PRODUCTS

• Code Testing
• Specification Testing
Code Testing

This strategy examines the logic of the program. A path is a specific combination
of conditions handled by the program. Using this strategy, every path through the
program is tested

Specification Testing

This strategy examines the specifications stating what the program


should do and how it should perform under various conditions. The
test cases are developed for each condition of developed System and
processed. It is found that the system developed perform according to
its specified requirements. The system is used experimentally to
ensure that the software will run according to tits specification and in
the way user expects.
Specification Testing is done successfully by entering various types of
end data. It is checked for both valid and invalid data and found
System is working properly as per requirement.
Test Cases For Validation

SL Test Test Input Expected Actual Status


NO Case Output Output (pass/fail)
TC- Register Email Registration Registration Pass
01 Form (abc@gmail.com) Success Success
FARMERS AGRO PRODUCTS

TC- Register Email Registration Email Fail


02 Form (abcgmail.com) Success format is
incorrect
TC- Register Phone number Phone Phone Pass
03 Form (999966666) number Number
success success
TC- Register Phone number Phone Enter Fail
04 Form (99999) number 10-
success digit
Phone
number
TC- Login Username(Seller Login Login Pass
05 form /buyer) Success Success
TC- Login Wrong Login Invalid Fail
06 form Username(seller Success username
/buyer)
TC- Login Password(seller Login Login Pass
07 form /buyer) Success Success
TC- Login Wrong Login Invalid Fail
08 form Password(seller success password
/buyer)
TC-09 Upload Upload product Added Added Pass
products image details successfully successfully
form
upload
image
TC-10 Upload Upload product Added Invalid Fail
products image details successfully Upload
form product
upload image in jpg
image or png
format
TC-11 Upload Upload product Added Added Pass
products Total amount successfully Successfully
form total
amount
TC-12 Upload Upload product Added Invalid Fail
products Total amount successfully enter total
form total amount in
amount number
format
FARMERS AGRO PRODUCTS

TC-13 Review Review ratings Added Added Pass


form successfully successfully
ratings
TC-14 Review Review ratings Added Invalid Fail
form successfully Enter b/w
ratings 0 to 10
TC-15 Buy Now Buy Now form Added Added Pass
form total total amount successfully successfully
amount
TC-16 Buy Now Buy Now form Added Invalid Fail
form total total amount successfully Enter total
amount amount in
number
format

TC-17 Review Review form Added Added Pass


form Description box successfully successfully
Description
box
TC-18 Review Review form Added Invalid enter Fail
form Description box successfully review
Description within 200
box characters
FARMERS AGRO PRODUCTS
FARMERS AGRO PRODUCTS
7. SCREENSHOTS
HOME PAGE
FARMERS AGRO PRODUCTS
Buyer Register Form

Farmer Register Form


FARMERS AGRO PRODUCTS

Farmer Login Form

Buyer Login Form


FARMERS AGRO PRODUCTS

Digital Market Form

My Profile form
FARMERS AGRO PRODUCTS

Upload Product form(1st half)

Upload product form (2nd half)


FARMERS AGRO PRODUCTS

Our Products Form

Search Product Form


FARMERS AGRO PRODUCTS

After selecting a product from previous a form below is displayed

Transaction Form
FARMERS AGRO PRODUCTS

Review Form

Order Details Form


FARMERS AGRO PRODUCTS
FARMERS AGRO PRODUCTS

8. FUTURE ENHANCEMENT

There is a wide scope for future development of the software. The world of
computer fields is not static it is always subject to change. The technology which
is famous today will become outdated very next day. As system exists as online it
possible to conduct auction wherever administrator being in journey. To keep
abstract of technical improvements, the system may be refinement. So it is not
concluded. Yet it will improve with further enhancements.

Android Version: Android version of this software will be made available so users

can use this software in their phones.

Feedback: A separate module can be used by the customer for taking feedback from
the customers
for improving this system through updates.

It is essential to change the software when new software arrives with more
advanced feathers. So it is much necessary for further development. Further
enhancements can be done in an efficient manner with disruption to the system.
This project may also be enhanced in several ways as there is always room for
improving the functionality of the application. The future enhancements that
would make the application more professional.

Email facility will be given for communication. Payment gate way like will be enabled.
FARMERS AGRO PRODUCTS

9. CONCLUSION

1. The main purpose of any software is that it satisfies users and software is reliable.

2. For
Seller has no income loss while uploading products and while selling
products as no middleman is involved.

3. For Buyer don’t need to pay extra amount as no middleman is involved.

4. This
system can be implemented for hassle free, simple and reduces time
andspace complexity

5. This system completes the work in the allocated slot time, and is highly

responsive for An offline application in a closed server system.


FARMERS AGRO PRODUCTS

10. BIBILIOGRAPHY

Below is the list of references using which we were able to complete our project
Successfully.

We referred to notes uploaded by w3schools also.

Websites:

www.w3schools.com www.youtube.com

Reference Books:

Programming the world wide web 4th edition by


Sebesta Web programming by Srikanth S

You might also like