A Library Management System built using PHP, MySQL, HTML, CSS, JavaScript, and Bootstrap. This system allows users to manage books, borrow and return books, and search for books in the library.
- Add new books with details like title, author, ISBN, genre, and quantity.
- View all books in a table.
- Delete books from the library.
- Register and log in as a user or admin.
- Admins can manage books and users.
- Borrow and return books.
- Track due dates and overdue books.
- Search for books by title, author, or ISBN.
- Built with Bootstrap for a modern and responsive UI.
- HTML, CSS, JavaScript
- Bootstrap (for styling)
- PHP (for server-side logic)
- MySQL (for database management)
- XAMPP (for local server setup)
- Git (for version control)
- XAMPP (or any local server like WAMP/MAMP).
- MySQL database.
- Git (optional, for cloning the repository).
git clone https://github.com/aboualine/library-management-system.git
cd library-management-system
- Open phpMyAdmin (or any MySQL client).
- Create a new database named library_management_system.
- Import the SQL file (database.sql) located in the
sql/
directory.
Open the config.php
file and update the database credentials:
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_NAME', 'library_management_system');
- Move the project folder to the
htdocs
directory of your XAMPP installation. - Start Apache and MySQL from the XAMPP Control Panel.
- Open your browser and navigate to:
http://localhost/library-management-system/
library-management-system/
│
├── index.php # Homepage (View Books)
├── add_book.php # Add a new book
├── delete_book.php # Delete a book
├── search_book.php # Search for a book
├── login.php # User login
├── register.php # User registration
├── config.php # Database configuration
├── styles.css # Custom CSS
├── script.js # Custom JavaScript
├── sql/
│ └── database.sql # SQL dump for the database
└── README.md # Project documentation
- Navigate to
add_book.php
. - Fill out the form with book details (title, author, ISBN, genre, quantity).
- Click Add Book.
- Go to
index.php
. - All books will be displayed in a table.
- Go to
search_book.php
. - Enter a search query (title, author, or ISBN).
- Matching books will be displayed.
- Log in as a user.
- Go to
index.php
. - Click Borrow next to the book you want to borrow.
- Log in as a user.
- Go to
index.php
. - Click Return next to the book you want to return.
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your message here"
- Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
- Bootstrap for the responsive design.
- PHP and MySQL for backend functionality.
- GitHub for hosting the repository.
For any questions or feedback, feel free to reach out:
📧 Email: mohamedaboualine@example.com
🐙 GitHub: aboualine