An Online Library Management System built using PHP and MySQL. This system allows users to browse books, register, log in, borrow books, and more.
- The
grub.phpfile works by scraping the gallery of a website called Standard Ebooks and storing it into a database. - The
book_gallery.phpgets data from the db and visualises it in the form of a catalogue. - The
read.phpgets the data from whichever book the user clicked and prints it to read.
- Book Gallery: View all available books in a gallery format.
- Search Functionality: Search for books by title or author. // NOT IMPLEMENTED
- User Authentication: Users can sign up, log in, and manage their accounts. // SEMI-IMPELEMENTED
- Borrowing System: Users can borrow books, with a record of borrow and return dates. // NOT IMPELEMENTED
- Admin Panel: Admins can add, edit, or delete books from the library catalog. // NOT IMPELEMENTED
- Frontend: HTML, CSS (Bootstrap)
- Backend: PHP
- Database: MySQL
- Libraries/Frameworks:
- Bootstrap (for responsive design)
- PDO (for database interaction)
- JavaScript (for interactivity)
- PHP: Ensure you have PHP installed (version 7.0+).
- MySQL: Ensure MySQL is installed and running.
-
Clone the repository:
git clone https://github.com/Cppchamp/Library_Management_System.git
-
Place the project folder in the htdocs or www directory of your local server (e.g., WAMP, XAMPP, or MAMP).
-
Create a MySQL database using the
library_management_db.sqlfile included in the project. -
Update your database connection settings in the
db.phpfile:$host = 'localhost'; $dbname = 'library_management_db'; $username = 'root'; $password = '';
-
Navigate to the project folder and open the index file in your browser:
http://localhost/Library_Management_System
- Sign up: Users can create an account to borrow books.
- Log in: After registering, users can log in with their credentials.
- Browse Books: Users can browse the available books in the library.
- Borrow Books: Users can borrow books for a specified period.
The database consists of the following tables:
-
users: Stores user information.
id: INT (Primary Key)username: VARCHARemail: VARCHARpassword: VARCHARrole: ENUM ('admin', 'user')
-
books: Stores book information.
id: INT (Primary Key)title: VARCHARauthor: VARCHARimageUrl: VARCHARbookUrl: VARCHAR
-
borrowed_books: Stores records of books borrowed by users.
id: INT (Primary Key)user_id: INT (Foreign Key referencingusers.id)book_id: INT (Foreign Key referencingbooks.id)borrow_date: DATEreturn_date: DATE
For any questions, feel free to reach out to the repository owner or email at [simon.kostov@gmail.com].