A comprehensive web-based blood donation management system built with Core PHP, designed to connect blood donors with recipients and facilitate blood donation drives.
B24U (Blood 24 You) is a web-based platform that aims to create a bridge between blood donors and recipients. The system provides opportunities to register for blood donation, request blood during emergencies, and manage blood donation events efficiently.
- π₯ Blood Request System: Patients can request specific blood types
- π₯ Donor Management: Complete donor registration and profile management
- π Event Management: Organize and manage blood donation camps
- π Health Reports: Track donation history and health reports
- π§ Email Notifications: Automated OTP and notification system
- π Secure Authentication: Separate login systems for donors and event organizers
Technology | Purpose |
---|---|
Frontend | HTML5, CSS3, JavaScript |
Backend | Core PHP |
Database | MySQL |
PHPMailer | |
Server | Apache (XAMPP/WAMP) |
Before running this project, ensure you have:
- XAMPP/WAMP Server (PHP 7.0+, MySQL 5.7+, Apache)
- Web Browser (Chrome, Firefox, Safari, etc.)
- Text Editor (VS Code, Sublime Text, Notepad++)
# Download XAMPP from official website
https://www.apachefriends.org/download.html
git clone https://github.com/dhairyadev26/Blood-Donation-PHP.git
- Copy the project folder to XAMPP directory:
C:/xampp/htdocs/B24U_CorePHP_SourceFile
- Start XAMPP Control Panel
- Start Apache and MySQL services
- Open browser and navigate to:
http://localhost/phpmyadmin
- Create a new database named:
b24u
- Import the database:
- Click Import tab
- Choose file:
Database/b24u.sql
- Click Go
- Navigate to:
B24U_CorePHP_SourceFile/sendemail.php
- Update email credentials:
function sendOTP($email,$subject,$body) {
$sentemail = "your-gmail@gmail.com"; // Your Gmail address
$sentpassword = "your-app-password"; // Your Gmail app password
// ... rest of the function
}
Important: Enable "Less secure app access" or use App Passwords for Gmail.
- Start XAMPP services (Apache & MySQL)
- Open browser and navigate to:
http://localhost/B24U_CorePHP_SourceFile
- Display current donation camps and events
- Show inspirational quotes about blood donation
- Information about platelets and blood donation importance
- Essential blood donation guidelines
- Pre and post-donation care instructions
- Health tips for donors
- Request Blood: Emergency blood request form
- Pending Requests: View all pending blood requests
- Real-time status updates
- Registration: Complete donor profile creation
- Login: Secure donor authentication
- Dashboard: Personal donation history
- Health Reports: Track health status and eligibility
- Event Registration: Register blood donation camps
- Event Login: Secure access for event organizers
- Donor List: View donors participating in events
- Event Status: Track event progress and statistics
- Monetary donation options
- Support system maintenance
- Community contribution tracking
- System information
- Feedback and suggestions
- Contact information
B24U_CorePHP_SourceFile/
βββ CSS/ # Stylesheets
β βββ styleindex.css
β βββ styleaboutus.css
β βββ stylebloodtips.css
β βββ ...
βββ Image/ # Images and assets
β βββ logo.png
β βββ i1.jpg - i4.png # Homepage images
β βββ ...
βββ mail/ # PHPMailer library
β βββ class.phpmailer.php
β βββ class.smtp.php
β βββ class.pop3.php
βββ connection.php # Database connection
βββ header.php # Common header
βββ footer.php # Common footer
βββ index.php # Homepage
βββ about_us.php # About page
βββ blood_tips.php # Blood tips page
βββ request_blood.php # Blood request form
βββ pending_request.php # Pending requests
βββ registar_donor.php # Donor registration
βββ login_donor.php # Donor login
βββ donor_page.php # Donor dashboard
βββ registar_event.php # Event registration
βββ login_event.php # Event login
βββ event_status.php # Event management
βββ contribute.php # Donation page
βββ get_in_touch.php # Contact page
βββ sendemail.php # Email functionality
βββ process.php # Form processing
Update connection.php
with your database credentials:
<?php
$host = "localhost";
$username = "root";
$password = "";
$database = "b24u";
$conn = mysqli_connect($host, $username, $password, $database);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
?>
Configure email settings in sendemail.php
:
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'your-email@gmail.com';
$mail->Password = 'your-app-password';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
Page | Preview |
---|---|
Home | ![]() |
Blood Tips | ![]() |
About Us | ![]() |
-
Database Connection Error
- Verify MySQL service is running
- Check database credentials in
connection.php
- Ensure database
b24u
exists
-
Email Not Working
- Enable "Less secure app access" in Gmail
- Use App Passwords for 2FA enabled accounts
- Check SMTP settings
-
Page Not Loading
- Verify Apache service is running
- Check file permissions
- Ensure correct URL path
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all blood donors who inspire this project
- PHPMailer library for email functionality
- Bootstrap and CSS frameworks for styling
- The open-source community for continuous support
Every drop counts, every donor matters!