Saim Project Document1
Saim Project Document1
Submitted by
Saim Ali
(REG.NO.: SP18-
BSE-029)
Sir. Aamir
TABLE OF THE CONTENT
ABSTRACT 1
INTRODUCTION
1
1.1 ABOUT THE PROJECT 2
SYSTEM SPECIFICATION
SYSTEM SPECIFICATION
4.1 MODULES 17
4.2 MODULE DISCRIPTION 18
4
4.3 INPUT AND OUTPUT DESIGN 21
4.4 DATAFLOW DIAGRAM 25
4.5 TABLE STUCTURE 28
CONCLUSION 35
6
BIBILIOGRAPHY 36
7
APPENDIX
8.1 APPENDIX SCREEN SHOTS 37
8
8.2 APPENDIX CODING 53
ABSTRACT
online library of blood donors in India. Sometimes doctors and blood bank project
have to face the difficulty in finding the blood group Donors at right time. Help Line
has attempted to provide the answer by taking upon itself the task of collecting Blood
bank project nationwide for the cause and care of people in need.
At any point of time the people who are in need can reach the donors through
our search facility. By mobilizing people and organization who desire to make a
designed to store, process, retrieve and analyze information concerned with the
administrative and inventory management within a blood bank. This project aims at
maintaining all the information pertaining to blood donors, different blood groups
available in each blood bank and help them manage in a better way. Aim is to provide
transparency in this field, make the process of obtaining blood from a blood bank
hassle free and corruption free and make the system of blood bank management
effective.
1
CHAPTER 1
Introduction
The basic building aim is to provide blood donation service to the city recently. Blood
store, process, retrieve and analyze information concerned with the administrative and
inventory management within a blood bank. This project aims at maintaining all the
information pertaining to blood donors, different blood groups available in each blood
bank and help them manage in a better way. Aim is to provide transparency in this
field, make the process of obtaining blood from a blood bank hassle free and
corruption free and make the system of blood bank management effective.
Blood bank is a place where blood bag that is collected from blood donation
events is stored in one place. The term “blood bank” refers to a division of a hospital
laboratory where the storage of blood product occurs and where proper testing is
performed to reduce the risk. It processes blood that will be supplied to the patients in
HSNZ according to their needs. Before the blood is supplied to the patients, the blood
will undergo several tests to ensure that the blood receiver is not infected by serious
diseases.
Blood Distribution Unit every month, HSNZ will organize blood donation
event which is one of the way they can increase the blood stock. After the blood
donation events, the blood bags that they obtained will undergo tests. All of the blood
received at the blood donation events must be managed thoroughly and systematically
to avoid patient who need the blood infected by any viruses or diseases.
The “Blood bank system project report” contain information related to blood like
• Blood type
• validity of Blood s
Bank blood donation system in java is planned to collect blood from many
donators in short from various sources and distribute that blood to needy people who
require blood. To do all this we require high quality software to manage those jobs.
The government spending lot of money to develop high quality “Blood Bank
management system project”. For do all those kinds of need blood bank management
system project in java contain modules which are include the detail of following areas:
Blood Donor
Blood Recipient
Blood collection
Blood issued
CHAPTER 2
SYSTEM SPECIFICATION
RAM : 2 GB
Back-end : My-SQL
2.3. ABOUT FRONT END:
The front end is an interface between the user and the back end. The front and
In network computing, front end can refer to any hardware that optimizes or
In compilers, the front end translates a computer programming source code into
an intermediate representation, and the back end works with the intermediate
representation to produce code in a computer output language. The back end usually
optimizes to produce code that runs faster. The front-end/back-end distinction can
separate the parser section that deals with source code and the back end that generates
These days, front-end development refers to the part of the web users interact
with. In the past, web development consisted of people who worked with Photoshop
and those who could code HTML and CSS , but also JavaScript or jQuery, which is a
Most of everything you see on any website is a mixture of HTML, CSS, and
JavaScript, which are all controlled by the browser. For example, if you’re using
Google Chrome or Firefox, the browser is what translates all of the code in a manner
for you to see and with which to interact, such as fonts, colors, drop-down menus,
sliders, forms, etc. In order for all of this to work, though, there has to be something to
support the front-end; this is where the backend comes into play
Software Discription & Tools Used:
1. PHP:-
Introduction
ordinary HTML page, a PHP script is not sent directly to a client by the server;
HTML elements in the script are left alone, but PHP code is interpreted and executed.
PHP code in a script can query databases, create images, read and write files, talk to
remote servers – the possibilities is endless. The output from PHP code is combined
with the HTML in the script and the result sent to the user’s web-browser, therefore it
can never tell the user whether the web-server uses PHP or not, because the entire
PHP’s support for Apache and MySQL further increases its popularity. Apache
is now the most-used web-server in the world, and PHP can be compiled as an Apache
module. MySQL is a powerful free SQL database, and PHP provides a comprehensive
set of functions for working with it. The combination of Apache, MySQL and PHP is
That doesn’t mean that PHP cannot work in other environments or with other
tools. In fact, PHP supports an extensive list of databases and web-servers. While in
the mid-1990s it was ok to build sites, even relatively large sites, with hundreds of
individual hard-coded HTML pages, today’s webmasters are making the most of the
power of databases to manage their content more effectively and to personalize their
There are some indisputable great reasons to work with PHP. As an open
source product, PHP is well supported by a talented production team and a committed
user community. Furthermore, PHP can be run on all the major operating systems
Its Portability
C is portable; it’s just the OS bits that aren’t. A lot PHP isn’t portable to
Windows since people don’t use the OS abstractions to avoid some problems.
Support available
PHP Syntax
You cannot view the PHP source code by selecting “View source” in the
browser – you will only see the output from the PHP file, which is plain HTML. This
is because the scripts are executed on the server before the result is sent back to the
browser.
HTML
used to create web pages. HTML was created in 1991 by Tim Berners-Lee at CERN
in Switzerland. It was designed to allow scientists to display and share their research.
The purpose of a web browser is to read HTML documents and compose them
into visible or audible web pages. The browser does not display the HTML tags, but
uses the tags to interpret the content of the page. HTML describes the structure of a
website semantically along with cues for presentation, making it a markup language
HTML elements form the building blocks of all websites. HTML allows
images and objects to be embedded and can be used to create interactive forms. It
text such as headings, paragraphs, lists, links, quotes and other items. It can embed
scripts written in languages such as Java Script which affect the behavior of HTML
HTML FORMS
An HTML form can contain input elements like text fields, checkboxes, radio-
buttons, submit buttons and more. A form can also contain select lists, textarea,
HTML5 will be the new standard for HTML. The previous version of HTML,
HTML 4.01, came in 1999. The web has changed a lot since then. HTML5 is still a
work in progress.
However, the major browsers support many of the new HTML5 elements and APIs.
HTML5 is cooperation between the World Wide Web Consortium (W3C) and the
Web
CSS
CSS tutorial or CSS 3 tutorial provides basic and advanced concepts of CSS
technology. Our CSS tutorial is developed for beginners and professionals. The major
• HTML, CSS and JavaScript are used for web designing. It helps the web
Cascading Style Sheets (CSS) is a style sheet language used for describing
the look and formatting of a document written in a markup language. While most
often used to style web pages and user interfaces written in HTML and XHTML, the
XML, SVG and XUL. CSS is a cornerstone specification of the web and almost all
document presentation, including elements such as the layout, colors, and fonts. This
separation can improve content accessibility, provide more flexibility and control in
formatting, and reduce complexity and repetition in the structural content (such as by
While the author of a document typically links that document to a CSS file,
readers can use a different style sheet, perhaps one on their own computer, to override
JAVASCRIPT
scripts to interact with the user, control the browser, communicate asynchronously,
and alter the document content that is displayed. It is also being used in server-side
network programming (with Node.js), game development and the creation of desktop
first-class functions. Its syntax was influenced by C. JavaScript copies many names
and naming conventions from Java, but the two languages are otherwise unrelated and
have very different semantics. The key design principles within JavaScript are taken
10
2.4 ABOUT BACK END:
In a previous blog, we talked about how web programmers are concerned with
launching websites, updates, and maintenance, among other things. All of that works
to support the front-end of the website. The back-end has three parts to it: server,
To better explain how all of this works, let’s use the example of a customer
trying to purchase a plane ticket using a website. Everything that the customer sees on
the webpage is the front-end, as we have explained before, but once that customer
enters all of his or her information, such as their name, billing address, destination, etc,
the web application stores the information in a database that was created previously on
The web application creates, deletes, changes, renames, etc items in the
database. For example, when a customer purchases a ticket, that creates an item in the
database, but when they have a change in their order or they wish to cancel, the item in
In short, when a customer wants to buy a ticket, the backend operation is the
web application communicating with the server to make a change in a database stored
on said server. Technologies like PHP, Ruby, Python, and others are the ones backend
programmers use to make this communication work smoothly, allowing the customer to
Introduction:
The database has become an integral part of almost every human's life. Without
it, many things we do would become very tedious, perhaps impossible tasks. Banks,
universities, and libraries are three examples of organizations that depend heavily on
some sort of database system. On the Internet, search engines, online shopping, and
even the website naming convention would be impossible without the use of a
a database server.
with an array of options and capabilities rarely seen in other database servers. MySQL
is free of charge for those wishing to use it for private and commercial use.
Use MySQL
The MySQL database server provides the ultimate in scalability, sporting the
flexibility is a stalwart feature of MySQL with all flavors of Linux, UNIX, and
configure the MySQL database server specifically for particular applications, with the
C) High Availability
vendors offering unique high-availability solutions for the MySQL database server.
Because guarding the data assets of corporations is the number one job of
powerful mechanisms for ensuring only authorized users have entry to the database
server, with the ability to block users down to the client machine level being possible.
e) Management Ease
MySQL offers exceptional quick-start capability with the average time from
software download to installation completion being less than fifteen minutes. This rule
holds true whether the platform is Microsoft Windows, Linux, Macintosh, or UNIX.
PHP Main Features of MySQL
• Fully multi-threaded using kernel threads. It can easily use multiple CPUs if they
are available.
• Relatively easy to add other storage engines. This is useful if you want to provide
• SQL functions are implemented using a highly optimized class library and should
initialization.
environment.
CHAPTER 3
Less Security.
Disadvantages
2. The system makes the overall project management much easier and flexible.
3. Readily upload the latest updates, allows user to download the alerts by
To debug the existing system, remove procedures those cause data redundancy,
level and also to reflect the current work status depending on organization/auditor or
Advantages:
The system makes the overall project management much easier and
flexible.
Readily upload the latest updates , allows user to download the alerts by
4.1 MODULES:-
Donor registration
Blood Request
Search donors
Contact Us
Admin login
of blood donor records and ease or control the distribution of blood in various part of
country basing on the hospitals demand. . This project includes mainly two
• Login:
Admin
The page require user name and password to start the application. Login is a
and authenticating the user through the cardinalities presented by the user. Admin can
Admin level user are a admin user, if he/she login a admin panel they work on
a all the pages of the admin site like add user, update user, delete user, add city,
the basic building aim is to provide blood donation service to the city recently. Blood
store, process, retrieve and analyze information concerned with the administrative and
inventory management within a blood bank. This project aims at maintaining all the
information pertaining to blood donors, different blood groups available in each blood
Registration Page:
Registration page includes the information of the donor who want to register.
Donor can register the account by clicking on new register. He/she can add the
When a new donor comes to donate blood, they are required to fill out their
personal information during the registration process before making a donation. After
the donation, the donor is given a donor identification card with their name, blood
type and a barcode to be used as a reference for future donations . The barcode is used
to retrieve the donor’s record containing their personal information, medical history
and donation information, including blood results .Only blood bank administrators
have the authority to access the donor’s records, since the system is only available for
their use within the organization. This makes it difficult for donors to make changes to
their personal information within the system. That is, for donors to update their
personal information, such as their phone number, mailing address, or e-mail, they
cannot update the information by themselves, but have to contact the blood bank
center to update their information . At the back the card is a table that contains number
of donations, date, location ,and the blood collector’s signature. Existing donors can
submit their donor ID cards to retrieve their personal information and donation records
and start the blood donation process, and they will be given a new card after they have
donated blood for a total of eight times. Having a donor ID card may be a tangible
reminder to people that they are helping lives as a blood donor; however, possessing a
physical card comes with drawbacks such as loss or damage. To ensure donors can
still identify themselves with the system, other credentials, such as username and
password, can be used as a safeguard if their donor ID card is lost or damaged. If the
donated blood is disqualified, the donor will be notified through postal mail that their
blood component is reactive to viruses , meaning that there is a positive result of the
blood being infected, and the organization will also inform the donor to perform
another blood test at the blood bank to confirm the result of blood. If the blood is
qualified, the administrator then will deposit the blood into the inventory for future
requests.
20
4.3 Input and Output Design:
of blood donor records and ease or control the distribution of blood in various part of
country basing on the hospitals demand. . This project includes mainly two
• Login:
Admin
The page require user name and password to start the application. Login is a
and authenticating the user through the cardinalities presented by the user. Admin can
Home page:-
This is the home page or the main page of a blood bank management system.
This is the main page of a client side. This page define all about related to project.
Blood Donor
Blood Recipient
Blood collection
Blood issued
Registration
Registration page includes the information of the donor who want to register.
Donor can register the account by clicking on new register. He/she can add the
Request for blood page includes the information of the donor who want to
register. Donor can register the account by clicking on new register. He/she can send
Search
Search button is used for search the donations of blood for a different deferent
blood groups.
• A-
• A+
• B-
• B+
• AB+
• AB-
• O+
• O-
Contact
information about this system then he/she can contact with us.
Person will get the blood immediately he/she requested for the particular blood
Update Profile
• Above snap short describe how the donor update our profile .This is
Admin Pannel
This is the admin side of the project, shows all the admin page like addition,
Person will get the blood immediately he/she requested for the particular blood group
Person will get the blood immediately he/she requested for the particular blood group
Add State
Person will get the blood immediately he/she requested for the particular blood group
This snapshort shows all the blood group. This shows blood group name and
id.
Person will get the blood immediately he/she requested for the particular blood group
INTRODUCTION OF DFD:-
shows the different processing activities or functions that the system performs and the
consider each function as a process that consumes some input data and produces some
output data.
The DFD (also known as the bubble chart) is a simple graphical formalism that
can be used to represent a system in terms of the input data to the system, various
processing carried out on these data, and the output data generated by the system) The
main reason why the DFD technique is so popular is probably because of the fact that
DFD is a very simple formalism- it is simple to understand and use. A DFD model
uses a very limited number of primitive symbols to represent the functions performed
by a system and the data flow among these functions. Starting with a set of high-level
functions that a system performs, a DFD model hierarchically represents various sub
functions. In fact, any hierarchical model is simple to understand. Human mind is such
hierarchical model, starting with a very simple and abstract model of a system;
different details of the system can be slowly introduced through different hierarchies.
4.5 TABLE STRUCTURE:-
Donor Table:
Field name Data type Length
Donor_id Int 10
Name char 25
Father name char 25
Gender char 10
DOB date
Blood varchar 15
Weight int 10
Email varchar 25
Address varchar 100
Contact int 10
Voluntary text
New_donor varchar 15
Donor_pic varchar 150
Status int 10
Purchace Table:
Id int 10
Name char 25
Gender char 10
Blood varchar 10
Bunit int 10
Rdate date
Cname char 25
Email varchar 20
contact int 10
Reason text
Status varchar 10
Message Table:
Testing is the process of executing then programs with the intention of finding
out errors. During the process, the project is executed with set of test and the output of
makes a logical assumption that if all the parts of the module are correct then goal will
be successfully achieved. Testing includes after the completion of the coding phase.
The project was tested from the very beginning and also at each step by entering
different type of data. In the testing phase some mistakes were found, which did not
come to knowledge at the time of coding the project. Then changes were made in the
project coding so that it may take all the relevant data and gives the required result.
All the forms were tested one by one and made all the required changes.
assumption that if all the parts of the system are correct, the goal will be successfully
achieved. A small system error can conceivably explode into a much larger problem.
Effective testing early in the process translates directly into long-term cost savings
from a reduced number of errors. For the verification and validation of data various-
nesting task are performed. Testing is itself capable of finding the syntactical mistakes
in the system but user need to test the system for logical checking.
30
5.2 LEVELS OF TESTING:
The aim of the testing process is to identify all the defects in the website. It is
not practical to test the website with respect to each value that the input request data
may assume. Testing provides a practical way of reducing defects in the website and
the website to a set of test inputs and observing if the program behaves as expected. If
the program fails to Testing behave as expected then conditions under which failure
occurs are noted for later debugging and correction. The following things are
not necessarily lead to a failure. A test case is the triplet [I, S, O] where I am data
input to the system. S is the state of the state of the system at which the data is input,
O is the expected output of the system A test suite is the set of all test cases with
FUCTIONAL TESTING:
Here the system is a black box whose behavior is determined by studying its
inputs and related outputs. The key problem is to select the inputs that have a huge
probability of being members of a set in may case; the selection of these test cases is
In unit testing the entire individual functions and modules were tested
independently. By following this strategy all the error in coding were identified and
corrected. This method was applied in combination with the white and black box
Unit testing is normally considered an adjunct to the coding step. Unit test case
design was started after source level code had been developed, reviewed, and verified
for correct syntax. A review of design information provides guidance for establishing
test cases that were likely to uncover errors in each of the categories discussed above.
INTEGRITY TESTING:
Integrity phases the entire module using the bottom-up approach and tested
them. Integrity testing is a systematic technique for constructing the program structure
while at the same time conducting tests to uncover errors associated with interfacing.
The objective was to take unit tested modules and build a program structure that has
The testing strategy has two different approaches namely the top-down
approach in which the integration is carried out from the top-level module to the
bottom and the bottom-up approach in which the integration is carried out from the
The modules were tested using the bottom-up approach by introducing stubs
for the top-level functions. This test was used to identify the errors in the interfaces,
the errors in passing the parameters between the functions and to correct them
• There are two types of testing available:
In black box testing the structure of the program is not considered. Test cases
are decided solely on the basis of the requirements or specifications of the program or
module, and the consideration for selection of test classes. In this section, we will
present some techniques for generating test cases for black-box testing. In black-box
testing, the testing only knows the inputs that can be given to the system and what
output the system can give. In other words the basis for deciding test case in
functional testing is the requirement or specification of the system module. This form
criterion for generating test causes is to strategy has little chance of resulting in a set
of test causes that is close to optimal(i.e. that detects the maximum errors with
minimum test cases). Hence we need some other criterion or rule for selecting test
cases. There are no formal rules for designing test cases for functional testing. In fact
there are no precise criteria for selecting test cases however, there have been found to
function that the tested program is proposed to program and does not deal with the
internal structure of the program responsible for actually implementing that function.
the program. On the other hand, white-box testing is concerned with testing
implementation of the program. The intent of this testing is not to exercise all the
different input or output conditions(although that may be buy products) but to exercise
the different programming structures and data structures used in the program. White-
box testing is also called structure testing and we will use the two terms
test cases that force the desired coverage of different structures various criteria have
been proposed for this. Unlike the criteria for functional testing which are frequently
imprecise, the criteria for structural testing are generally quite precise as they are
CONCLUSION
With the theoretical inclination of our syllabus it becomes very essential to take
the atmost advantage of any opportunity of gaining practical experience that comes
along. The building blocks of this Major Project ”BLOOD BANK Management
System” was one of these opportunities. It gave us the requisite practical knowledge to
supplement the already taught theoretical concepts thus making us more competent as
a computer engineer. The project from a personal point of view also helped us in
The project also provided us the opportunity of interacting with our teachers and to
BIBLIOGRAPHY
o http://www.google.com
o http://www.w3schools.com
CHAPTER 8
50
User home page:
8.2 APPENDIX
Admin.php:-
<?php
session_start();
include("config.php");
?>
<html lang="en">
<head>
<?php include("head.php");?>
</head>
<body>
<?php include("top_nav.php"); ?>
<!-- Navigation -->
<!-- Page Content -->
<div class="container" style="margin-top:70px;">
<!-- Page Heading/Breadcrumbs -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header text-primary"><i class='fa fa-user-md'></i> Admin Login
</h1>
</div>
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
<?php
if(isset($_POST["submit"]))
{ if($_POST["user"]=="admin"&&$_POST["pass"]=="admin")
{ $_SESSION['usertype']
='admin';
$_SESSION['username']='admin';
header("location:admin_inbox.php");
}
else
{
echo "<div class='alert alert-danger'><b>Error</b> User Name and Password
Incorrect.</div>";
}
}
?>
<form role="form" action="admin.php" method="post">
<div class="form-group">
<label for="user_name" class="text-primary">User Name</label>
<input class="form-control" name="user" id="user" type="text" required>
</div>
<div class="form-group">
<label for="pass" class="text-primary">Password</label>
<input class="form-control" id="pass" name="pass" type="password" value=""
required>
</div>
<button class="btn btn-primary pull-right" name="submit" type="submit"><i
class="fa fa-sign-in"></i> Login Here</button>
</form>
</div>
<div class="col-md-3"></div>
</div>
</div>
<!-- /.row -->
<!-- Footer -->
<?php include"footer.php";?>
</div>
</body>
</html>
Donor registration.php:-
<?php
include("config.php");
//include("functions.php");
error_reporting(0);?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include("head.php");?>
</head>
<body>
<?php
include("top_nav.php");
?>
<div class="container" style='margin-top:70px;'>
<div class="row">
<div class="col-md-12">
<h3 class=" text-primary">
<i class='fa fa-users'></i> New Donor Registration
</h3><hr>
<?php include("blood_bread.php"); ?>
</div>
</div>
<div class="row centered-form ">
<div class="col-xs-12 col-sm-8 col-md-6 col-sm-offset-2 col-md-offset-3">
<?php
if(isset($_POST["submit"]))
{
$target_dir = "donor_image/";
$img="donor_image/noimage.jpg";
$target_file = $target_dir.rand(100,999).
basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
if($check !== false) {
echo "";
$uploadOk = 1;
} else {
// echo "File is not an image.";
$uploadOk = 0;
}
<div class="form-group">
<label class="control-label text-primary" for="GENDER">Gender</label>
<select id="gen" name="GENDER" required class="form-control input-sm">
<option value="">Select Gender</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="others">others</option>
</select>
</div>
<div class="form-group">
<label class="control-label text-primary" for="DOB">D.O.B</label>
<input type="text" placeholder="YYYY/MM/DD" required id="DOB" name="DOB"
class="form-control input-sm DATES">
</div>
<div class="form-group">
<label class="control-label text-primary" for="BLOOD" >Blood Group</label>
<select id="blood" name="BLOOD" required class="form-control input-sm">
<option value="">Select Blood</option>
<option value="A+">A+</option>
<option value="A-">A-</option>
<option value="B+">B+</option>
<option value="B-">B-</option>
<option value="O+">O+</option>
<option value="O-">O-</option>
<option value="AB+">AB+</option>
<option value="AB-">AB-</option>
</select>
</div>
<div class="form-group">
<label class="control-label text-primary" for="BODY_WEIGHT" >Body
Weight</label>
<input type="text" required placeholder="Weight In Kgs" name="BODY_WEIGHT"
id="BODY_WEIGHT" class="form-control input-sm">
</div>
<div class="form-group">
<label class="control-label text-primary" for="EMAIL" >Email ID</label>
<input type="email" required name="EMAIL" id="EMAIL" class="form-control"
placeholder="Email Address">
</div>
<div class="form-group">
<label class="control-label text-primary" for="COUNTRY">Country</label>
<select name="COUNTRY" id="COUNTRY" required class="form-control">
<option value="">Select Country</option>
<?php
$sql="SELECT COUNTRY_ID,COUNTRY_NAME FROM country ORDER BY
COUNTRY_NAME ASC";
$result=$con->query($sql);
if($result->num_rows>0)
{
while($row=$result->fetch_assoc())
{
echo "<option value='{$row['COUNTRY_ID']}'>{$row['COUNTRY_NAME']}
</option>";
}
}
?>
</select>
</div>
<div class="form-group">
<label class="control-label text-primary" for="STATE">State</label>
<select name="STATE" id="STATE" required class="form-control">
<option value="">Select State</option>
<?php
$sql="SELECT STATE_ID,STATE_NAME FROM state ORDER BY
STATE_NAME ASC";
$result=$con->query($sql);
if($result->num_rows>0)
{
while($row=$result->fetch_assoc())
{
echo "<option value='{$row['STATE_ID']}'>{$row['STATE_NAME']}
</option>";
}
}
?>
</select>
</div>
<div class="form-group">
<label class="control-label text-primary" for="CITY" >City</label>
<select name="CITY" id="CITY" required class="form-control">
<option value="">Select City</option>
<?php
$sql="SELECT CITY_NAME,CITY_ID FROM city ORDER BY CITY_NAME";
$result=$con->query($sql);
if($result->num_rows>0)
{
while($row=$result->fetch_assoc())
{
echo "<option value='{$row['CITY_ID']}'>{$row['CITY_NAME']} </option>";
}
}
?>
</select>
</div>
<div class="form-group">
<label class="control-label text-primary" for="AREA" >Area</label>
<input type="text" required name="AREA" id="AREA" class="form-control"
placeholder="Insert Area">
</div>
<div class="form-group">
<label class="control-label text-primary" for="ADDRESS">Address</label>
<textarea required name="ADDRESS" id="ADDRESS" rows="5"
style="resize:none;"class="form-control" placeholder="Full Address"></textarea>
</div>
60
<div class="form-group">
<label class="control-label text-primary" for="PINCODE">Pincode</label>
<input type="text" required name="PINCODE" id="PINCODE" class="form-control"
placeholder="Insert Pincode">
</div>
<div class="form-group">
<label class="control-label text-primary" for="CONTACT_1" >Contact-1</label>
<input type="text" required name="CONTACT_1" id="CONTACT_1" class="form-
control" placeholder="Contact No-1">
</div>
<div class="form-group">
<label class="control-label text-primary" for="CONTACT_2" >Contact-2</label>
<input type="text" required name="CONTACT_2" id="CONTACT_2" class="form-
control" placeholder="Contact No-2">
</div>
<hr>
<div class="form-group">
<label class="control-label text-primary"><input type="checkbox" id="c1" >
Voluntary Donor</label>
</div>
<div id="volu">
<div class="form-group">
/*
$("#CITY").change(function(){
var city=$("#CITY").val();
//alert(city);
$.post('functions.php',{G_CITY_ID:city},function(data){
// alert(data);
$("#STATE").html(data);
});
});*/
$("#COUNTRY").change(function(){
var countr=$("#COUNTRY").val();
//alert(city);
$.post('get_state.php',{G_STATE_ID:countr},function(data){
// alert(data);
$("#STATE").html(data);
});
});
$("#STATE").change(function(){
var stid=$("#STATE").val();
//alert(city);
$.post('get_city.php',{G_STATE_ID:stid},function(data){
// alert(data);
$("#CITY").html(data);
});
})
});
$(function() {
var availableTags = [
<?php
$sql="SELECT AREA_NAME FROM area";
$result=$con->query($sql);
if($result->num_rows>0)
{
$i=0;
$n=$result->num_rows;
while($row=$result->fetch_assoc())
{
$i++;
if($n!=$i)
{
echo '"'.$row['AREA_NAME'].'",';
}
else
{
echo '"'.$row['AREA_NAME'].'"';
}}
}
?>
];
$( "#AREA" ).autocomplete({
source: availableTags
});
});
</script>
</body>
</html>