A complete, professional clinic management system built with PHP 8, MySQL, and Bootstrap 5.
This is a comprehensive web-based clinic management system designed for healthcare facilities to manage appointments, patients, doctors, and medical records efficiently.
- Professional responsive homepage
- About Us page
- Doctors listing with search and filter
- Services listing
- Contact form
- User registration and login
- Dashboard with statistics and analytics
- Manage Doctors (CRUD operations)
- Manage Patients (CRUD operations)
- Manage Appointments (view, update status)
- Manage Services (CRUD operations)
- Manage Payments
- User Management
- Reports (Appointments, Doctors, Patients, Payments)
- System Settings
- Dashboard with today's appointments
- My Appointments management
- My Patients list
- Medical Records management
- Profile management
- Dashboard with upcoming appointments
- Book new appointments
- Appointment history
- View medical records
- Notifications
- Profile management
- PDO Prepared Statements (SQL Injection prevention)
- Password hashing using
password_hash()andpassword_verify() - CSRF Token protection
- XSS protection with
htmlspecialchars() - Role-based access control (RBAC)
- Session validation
- Input validation and sanitization
- Backend: PHP 8 Native
- Database: MySQL with PDO
- Frontend: HTML5, CSS3, Bootstrap 5
- JavaScript: Vanilla JS, AJAX
- Server: Apache (XAMPP compatible)
- XAMPP (Apache + MySQL)
- PHP 8.0 or higher
- MySQL 5.7 or higher
-
Copy Project to htdocs
Copy the entire `Clinic_System` folder to your XAMPP htdocs directory: - Windows: C:\xampp\htdocs\Clinic_System - Mac: /Applications/XAMPP/htdocs/Clinic_System - Linux: /opt/lampp/htdocs/Clinic_System -
Start XAMPP Services
- Open XAMPP Control Panel
- Start Apache server
- Start MySQL server
-
Create Database
- Open your web browser
- Go to http://localhost/phpmyadmin
- Click on "New" to create a new database
- Name it
clinic_dband click Create - Select the database
- Click on "Import" tab
- Click "Choose File" and select
database.sqlfrom the project folder - Click "Go" to import
-
Configure Database Connection
- Open
config/database.php - Update the following constants if needed:
define('DB_HOST', 'localhost'); define('DB_NAME', 'clinic_db'); define('DB_USER', 'root'); define('DB_PASS', ''); // Default XAMPP has no password
- Open
-
Access the Application
- Open your web browser
- Go to: http://localhost/Clinic_System/
- Username: admin
- Password: password123
- Access: Full system access
- Username: drsmith (or drjohnson, drwilliams, drbrown)
- Password: password123
- Access: Doctor dashboard
- Username: johndoe (or janedoe, mikejohnson, etc.)
- Password: password123
- Access: Patient dashboard
Clinic_System/
├── admin/
│ ├── dashboard.php
│ ├── doctors.php
│ ├── patients.php
│ ├── appointments.php
│ ├── services.php
│ ├── payments.php
│ ├── users.php
│ ├── reports.php
│ ├── settings.php
│ ├── profile.php
│ ├── sidebar.php
│ └── footer.php
├── doctor/
│ ├── dashboard.php
│ ├── appointments.php
│ ├── patients.php
│ ├── records.php
│ ├── profile.php
│ ├── ajax_update_status.php
│ ├── sidebar.php
│ └── footer.php
├── patient/
│ ├── dashboard.php
│ ├── appointments.php
│ ├── history.php
│ ├── records.php
│ ├── notifications.php
│ ├── profile.php
│ ├── cancel_appointment.php
│ ├── ajax_slots.php
│ ├── sidebar.php
│ └── footer.php
├── assets/
│ ├── css/
│ │ ├── style.css
│ │ └── dashboard.css
│ ├── js/
│ │ ├── main.js
│ │ └── dashboard.js
│ └── images/
├── config/
│ ├── config.php
│ └── database.php
├── includes/
│ ├── auth.php
│ ├── access_control.php
│ ├── functions.php
│ ├── header.php
│ └── footer.php
├── uploads/
├── index.php
├── login.php
├── register.php
├── logout.php
├── about.php
├── doctors.php
├── services.php
├── contact.php
├── access_denied.php
├── database.sql
├── .htaccess
└── README.md
- users - User accounts (username, email, password, etc.)
- roles - User roles (Administrator, Doctor, Patient)
- patients - Patient profiles (DOB, gender, blood group, etc.)
- doctors - Doctor profiles (specialization, qualifications, etc.)
- appointments - Appointment records
- services - Medical services offered
- payments - Payment records
- medical_records - Patient medical records
- notifications - User notifications
- activity_logs - System activity logs
- settings - System configuration
- Full system access
- Manage all users (doctors, patients, staff)
- View all appointments and records
- Generate reports
- System configuration
- View own appointments only
- View assigned patients only
- Create and manage medical records
- Update appointment status
- View own profile
- Book new appointments
- Cancel own appointments
- View own medical records
- View own notifications
- Update own profile
- Ensure MySQL is running in XAMPP
- Check database credentials in
config/database.php - Verify database
clinic_dbexists
- Ensure project is in htdocs folder
- Check the URL: http://localhost/Clinic_System/
- Clear browser cookies
- Verify database is imported correctly
- Check if sessions are working
- Clear browser cache
- Check file paths in templates
- Ensure mod_rewrite is enabled
This project is created for educational purposes as part of a university Web Development course.
University Project - Web Development Course