Skip to content

Blood Donation System - A PHP/MySQL web platform connecting blood donors with recipients. Features blood requests, donor registration, event management, and email notifications. 🩸 Bridging donors and those in need.

License

Notifications You must be signed in to change notification settings

dhairyadev26/Blood-Donation-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

42 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩸 B24U - Blood Donation Management System

PHP Version MySQL License

A comprehensive web-based blood donation management system built with Core PHP, designed to connect blood donors with recipients and facilitate blood donation drives.

🎯 Overview

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.

Key Features

  • πŸ₯ 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 Stack

Technology Purpose
Frontend HTML5, CSS3, JavaScript
Backend Core PHP
Database MySQL
Email PHPMailer
Server Apache (XAMPP/WAMP)

πŸ“‹ Prerequisites

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++)

πŸš€ Installation & Setup

1. Download and Install XAMPP

# Download XAMPP from official website
https://www.apachefriends.org/download.html

2. Clone the Repository

git clone https://github.com/dhairyadev26/Blood-Donation-PHP.git

3. Setup Project Files

  1. Copy the project folder to XAMPP directory:
    C:/xampp/htdocs/B24U_CorePHP_SourceFile
    

4. Database Setup

  1. Start XAMPP Control Panel
  2. Start Apache and MySQL services
  3. Open browser and navigate to: http://localhost/phpmyadmin
  4. Create a new database named: b24u
  5. Import the database:
    • Click Import tab
    • Choose file: Database/b24u.sql
    • Click Go

5. Configure Email Settings

  1. Navigate to: B24U_CorePHP_SourceFile/sendemail.php
  2. 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.

6. Run the Project

  1. Start XAMPP services (Apache & MySQL)
  2. Open browser and navigate to:
    http://localhost/B24U_CorePHP_SourceFile
    

πŸ“± System Modules

🏠 Home Page

  • Display current donation camps and events
  • Show inspirational quotes about blood donation
  • Information about platelets and blood donation importance

🩸 Blood Tips

  • Essential blood donation guidelines
  • Pre and post-donation care instructions
  • Health tips for donors

πŸ†˜ Blood Request System

  • Request Blood: Emergency blood request form
  • Pending Requests: View all pending blood requests
  • Real-time status updates

πŸ‘€ Donor Module

  • Registration: Complete donor profile creation
  • Login: Secure donor authentication
  • Dashboard: Personal donation history
  • Health Reports: Track health status and eligibility

πŸŽͺ Event Management

  • 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

πŸ’ Contribution System

  • Monetary donation options
  • Support system maintenance
  • Community contribution tracking

ℹ️ About Us

  • System information
  • Feedback and suggestions
  • Contact information

πŸ—‚οΈ Project Structure

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

πŸ”§ Configuration

Database Configuration

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());
}
?>

Email Configuration

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;

πŸ“Έ Screenshots

Page Preview
Home Home Page
Blood Tips Blood Tips
About Us About Us

🚨 Troubleshooting

Common Issues

  1. Database Connection Error

    • Verify MySQL service is running
    • Check database credentials in connection.php
    • Ensure database b24u exists
  2. Email Not Working

    • Enable "Less secure app access" in Gmail
    • Use App Passwords for 2FA enabled accounts
    • Check SMTP settings
  3. Page Not Loading

    • Verify Apache service is running
    • Check file permissions
    • Ensure correct URL path

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • 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

🩸 Save Lives, Donate Blood 🩸
Every drop counts, every donor matters!

About

Blood Donation System - A PHP/MySQL web platform connecting blood donors with recipients. Features blood requests, donor registration, event management, and email notifications. 🩸 Bridging donors and those in need.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published