Web platform that connects voluntary blood donors with those in need of blood. The platform enables volunteers to register as donors and other to search for available donors based on blood group and location.
- Users can register as blood donors
- Collects donor information:
- First Name and Last Name
- Blood Group (A+, A-, B+, B-, O+, O-, AB+, AB-)
- PIN Code (location identifier)
- Email ID
- Mobile Number (10 digits)
- Form validation with client-side checks
- Search for available donors by:
- First Name
- Blood Group
- PIN Code (area/location)
- Displays matching donor results in a table format
- Shows donor details: Name, Blood Group, Location (PIN), Contact (Mobile & Email)
| Component | Technology |
|---|---|
| Backend | PHP 5.6+ |
| Database | MySQL |
| Frontend | HTML5, CSS3 |
| Client-side Scripting | JavaScript |
| Server | Apache/Apache2 with PHP support |
Before setting up the application, ensure you have:
-
Web Server: Apache with PHP support
- Recommended: XAMPP, WAMP, or LAMP
-
PHP: Version 5.6 or higher
- MySQLi extension enabled
-
MySQL: Version 5.5 or higher
-
Optional:
- Text Editor or IDE (VS Code, PHPStorm, etc.)
- Browser (Chrome, Firefox, Safari, etc.)
cd d:\GithubRepos
# or navigate to your web server's root directoryPlace the BLOODnegative folder in your web server's root directory:
- XAMPP:
C:\xampp\htdocs\BLOODnegative - WAMP:
C:\wamp\www\BLOODnegative - LAMP:
/var/www/html/BLOODnegative
-
Open phpMyAdmin (usually at
http://localhost/phpmyadmin) -
Create a new database named
blooddonation -
Run the following SQL command to create the volunteer table:
CREATE TABLE `volunteer` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`fname` VARCHAR(50) NOT NULL,
`lname` VARCHAR(50) NOT NULL,
`bloodgr` VARCHAR(5) NOT NULL,
`pincode` VARCHAR(6) NOT NULL,
`mbno` VARCHAR(10) NOT NULL,
`eid` VARCHAR(100) NOT NULL,
`created_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);Edit the db.php file with your MySQL credentials:
<?php
$sname = "localhost"; // MySQL server address
$un = "root"; // MySQL username
$pass = ""; // MySQL password
$db = "blooddonation"; // Database name
$conn = mysqli_connect($sname, $un, $pass, $db);
if (!$conn) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?>Note: Update the $pass variable if your MySQL has a password.
- Start Apache/Web Server
- Start MySQL service
- Ensure PHP is enabled
Open your browser and navigate to:
http://localhost/BLOODnegative/
or if using a different port:
http://localhost:8080/BLOODnegative/
BLOODnegative/
├── index.php # Home page with donor search form
├── registerform.php # Donor registration form
├── insert.php # Process donor registration
├── searchdonor.php # Dedicated search page
├── vpage.php # Display search results/donor list
├── about.php # About Us page
├── gallery.php # Gallery/Images page
├── contact.php # Contact & Feedback page
├── contactlist.php # Contact details/management
├── db.php # Database connection configuration
├── styles.css # CSS styling
├── script.js # JavaScript validation & utilities
├── image/ # Image assets directory
└── README.md # This file
- Gallery: View images of blood donation awareness campaigns
- About Us: Learn about the organization's mission
- Contact: Submit feedback, reports, or queries
- News & Activities: Stay updated on upcoming blood donation camps
Edit the news section in index.php:
<marquee direction="up">
<ol>
<li>Upcoming blood donation camps:
<ul>
<li>JAIPUR : 12 sep 2019.</li>
<!-- Add/modify camp information here -->
</ul>
</li>
</ol>
</marquee>