A comprehensive web-based library management system built with PHP and MySQL that allows students to borrow books, manage their accounts, and enables administrators to manage the library inventory.
- User registration and authentication
- Secure login with rate limiting and CSRF protection
- View available books
- Borrow and return books
- View issued books history
- Profile management
- Password recovery system
- Admin dashboard
- Book management (add, edit, delete)
- Category management
- Author management
- Student account management
- Issue/return book tracking
- Fine calculation for late returns
- Frontend: HTML5, CSS3, Bootstrap, jQuery
- Backend: PHP
- Database: MySQL
- Server: Apache (XAMPP)
library/
├── admin/ # Admin panel files
├── assets/ # Static assets (CSS, JS, images)
├── includes/ # Common PHP includes
├── error/ # Error handling files
├── logs/ # Application logs
├── .env # Environment configuration
├── .htaccess # Apache configuration
├── index.php # Main entry point
├── library.sql # Database schema
└── various PHP files # Core application files
The system uses the following main tables:
admin- Administrator accountstblstudents- Student user accountstblbooks- Book inventorytblauthors- Author informationtblcategory- Book categoriestblissuedbookdetails- Book borrowing records
-
Prerequisites
- XAMPP (Apache, MySQL, PHP)
- Web browser
-
Installation
- Clone or download this repository to your XAMPP's htdocs directory
- Create a new MySQL database named
library - Import the
library.sqlfile into your database - Configure your database connection in
includes/config.php
-
Configuration
- Update the
.envfile with your database credentials - Ensure proper permissions are set on the
logsdirectory
- Update the
-
Access
- Start your XAMPP server
- Access the application through:
http://localhost/library - Default admin credentials:
- Username: admin
- Password: admin123
- Password hashing
- CSRF protection
- Rate limiting for login attempts
- Input sanitization
- Session management
- SQL injection prevention using prepared statements
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please contact the system administrator or create an issue in the repository.