A comprehensive web-based Blood Bank Management System built with PHP and MySQL that simplifies the process of finding blood in emergencies.
This system allows users to:
- Find blood in emergency situations
- Donate blood at their convenience
- Request blood from blood banks or individual donors
- Manage blood inventory across multiple blood banks
- Provide feedback and register complaints
- User Registration & Login: Secure authentication for users and donors
- Profile Management: Update personal information and donor status
- Blood Donation: Schedule donations at nearby blood banks
- Blood Ordering: Request blood from blood banks or individual donors
- Donation History: Track all blood donation activities
- Order History: View all blood order requests
- Feedback System: Submit feedback and complaints to administrators
- Hospital Registration & Login: Separate authentication for hospitals
- Hospital Profile: Manage hospital information
- Blood Ordering: Request blood for patients
- Order Management: Track blood order history
- Blood Inventory View: Check available blood units across blood banks
- Feedback System: Send feedback to administrators
- Comprehensive Dashboard: Overview of all system activities
- User Management: View and block/unblock users
- Donor Management: Monitor all registered donors
- Hospital Management: Manage hospital accounts
- Blood Bank Management: View all blood banks in the system
- Donation Management: Approve or reject donation requests
- Order Management: Process blood order requests
- Feedback Management: Respond to user and hospital feedback
- Inventory Management: Update blood inventory across blood banks
- Frontend: HTML5, CSS3, JavaScript
- Backend: PHP
- Database: MySQL
- Server: XAMPP (Apache, MySQL)
blood-bank-management/
├── admin/ # Admin panel pages
│ ├── dashboard.php
│ ├── manage_users.php
│ ├── manage_donors.php
│ ├── manage_hospitals.php
│ ├── manage_blood_banks.php
│ ├── manage_donations.php
│ ├── manage_orders.php
│ ├── manage_feedback.php
│ ├── blood_inventory.php
│ └── sidebar.php
├── user/ # User dashboard pages
│ ├── dashboard.php
│ ├── profile.php
│ ├── donate_blood.php
│ ├── order_blood.php
│ ├── my_donations.php
│ ├── my_orders.php
│ ├── feedback.php
│ └── sidebar.php
├── hospital/ # Hospital dashboard pages
│ ├── dashboard.php
│ ├── profile.php
│ ├── order_blood.php
│ ├── my_orders.php
│ ├── blood_inventory.php
│ ├── feedback.php
│ └── sidebar.php
├── config/ # Configuration files
│ ├── db_connect.php
│ └── session.php
├── assets/ # Static assets
│ └── css/
│ └── style.css
├── index.php # Landing page
├── login.php # Login page
├── register.php # Registration page
├── logout.php # Logout handler
├── blood_bank.sql # Complete database with demo data
├── DEMO_CREDENTIALS.txt # Quick reference for login
└── README.md # This file
- XAMPP (or any Apache + MySQL + PHP environment)
- Web browser
- Text editor (optional, for customization)
- Download XAMPP from https://www.apachefriends.org/
- Install XAMPP on your system
- Start Apache and MySQL from XAMPP Control Panel
- Download or clone this project
- Extract the files to a folder (e.g.,
blood-bank-management)
- Copy the project folder to your XAMPP's
htdocsdirectory- Windows:
C:\xampp\htdocs\ - Mac:
/Applications/XAMPP/htdocs/ - Linux:
/opt/lampp/htdocs/
- Windows:
- Open your web browser
- Go to
http://localhost/phpmyadmin - Click on "Import" tab from the top menu
- Click "Choose File" and select
blood_bank.sql - Click "Go" to import everything at once
This single file creates the database, tables, and includes all demo data!
The database configuration is already set in config/db_connect.php:
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'blood_bank_db');If your MySQL has a different username/password, update these values.
Open your web browser and navigate to:
http://localhost/blood-bank-management/
Or if your folder is named 370-Project:
http://localhost/370-Project/
- Username:
admin - Password:
admin123
- Email:
samiha.haque@email.com| Password:password123(Patient - AB+, Dhaka) - Email:
farhan.kabir@email.com| Password:password123(Donor - O-, Sylhet) - Email:
ahmed.khan@email.com| Password:password123(Donor - B+, Chittagong) - Email:
isha.agerwal@email.com| Password:password123(Patient - A+, Dhaka)
- Email:
admin@dmch.gov.bd| Password:hospital123(Dhaka Medical College) - Email:
contact@cmch.gov.bd| Password:hospital123(Chittagong Medical College) - Email:
info@squarehospital.com| Password:hospital123(Square Hospital Dhaka)
You can also register a new user or hospital account through the registration page.
- Register: Click "Register" and select "User/Donor"
- Fill Details: Enter your personal information
- Login: Use your email and password to login
- Donate Blood: Navigate to "Donate Blood" and select a blood bank
- Order Blood: Go to "Order Blood" to request blood
- Track: View your donation and order history
- Register: Click "Register" and select "Hospital"
- Fill Details: Enter hospital information and license number
- Login: Use hospital email and password
- Order Blood: Request blood for patients
- View Inventory: Check available blood units
- Track Orders: Monitor order status
- Login: Use admin credentials
- Dashboard: View system statistics
- Manage: Access various management pages from sidebar
- Approve: Process donation and order requests
- Respond: Handle user feedback and complaints
- A+
- A-
- B+
- B-
- AB+
- AB-
- O+
- O-
users- User and donor informationhospitals- Hospital accountsadmins- Administrator accountsblood_banks- Blood bank locationsblood_inventory- Blood stock managementblood_donations- Donation recordsblood_orders- Blood order requestsfeedback- User and hospital feedback
- Password encryption using MD5
- Session-based authentication
- SQL injection prevention
- User blocking functionality for admins
- Role-based access control
- Modern and responsive design
- Mobile-friendly layout
- Intuitive navigation
- Color-coded status badges
- Clean and professional appearance
- Verify XAMPP MySQL is running
- Check database credentials in
config/db_connect.php - Ensure database
blood_bank_dbexists
- Check project folder is in
htdocs - Verify the URL path matches your folder name
- Ensure Apache is running in XAMPP
- Verify you imported the database correctly
- Check if admin account exists in
adminstable - Clear browser cache and try again
- Enable PHP error reporting
- Check PHP error logs in XAMPP
- Verify all files are uploaded correctly
blood_bank.sql - Complete All-in-One Setup
- Creates database
blood_bank_db - Creates all 8 tables with proper relationships
- 1 default admin account (admin/admin123)
- 3 blood banks with full inventory (72 records covering all blood groups)
- 15 sample users (11 donors + 4 patients)
- 5 sample hospitals (real Bangladeshi hospitals)
- 15 blood donation records
- 14 blood order requests
- 9 feedback entries with admin responses
- Everything you need in one file!
For production use, consider upgrading from MD5 to more secure hashing algorithms like:
password_hash()with bcrypt- Argon2
- Modify
assets/css/style.cssfor styling changes - Update database configuration as needed
- Add more blood banks through admin panel
For issues or questions:
- Check the troubleshooting section
- Review the database schema
- Verify XAMPP configuration
This project is created for educational purposes.
| Role | Can Register | Needs Approval | Can Donate | Can Order | Can Manage |
|---|---|---|---|---|---|
| User/Donor | ✓ | ✗ | ✓ | ✓ | ✗ |
| Hospital | ✓ | ✗ | ✗ | ✓ | ✗ |
| Admin | ✗ | N/A | ✗ | ✗ | ✓ |
- Emergency Blood Finding: Quickly locate available blood
- Donor Network: Connect with registered donors
- Inventory Tracking: Real-time blood availability
- Request Management: Streamlined approval process
- User Feedback: Two-way communication system
Made with ❤️ for saving lives
Remember: Every blood donation can save up to 3 lives!