LearnHub is a web-based learning platform where users can explore a wide range of courses. The application is built using the LAMP stack, leveraging Linux (InfinityFree hosting), Apache, MySQL, and PHP for backend functionality. For styling, I used HTML and Bootstrap to ensure a user-friendly and responsive interface. LearnHub is deployed on InfinityFree, with open access to the index page for both authenticated and unauthenticated users.
- Course Listings: Browse and explore a diverse selection of courses.
- User Authentication: Register, log in, and access additional features.
- Responsive Design: Mobile-friendly design using Bootstrap.
- Accessible Content: Unauthenticated users can view the main content on the homepage.
- MySQL Database: Backend data storage and management for courses and user data.
- Frontend: HTML, CSS (Bootstrap)
- Backend: PHP
- Database: MySQL
- Deployment: InfinityFree hosting platform
To run this project locally, you'll need:
- PHP (>=7.0)
- MySQL
- A local server setup (e.g., XAMPP, MAMP, or WAMP)
-
Clone the Repository:
git clone https://github.com/your-username/LAMP-LearnHub.git cd learnhub
-
Set Up the Database:
- Import the provided SQL code (see below) to create the necessary tables.
- Configure database credentials in
db.php
or similar setup file.
-
Start the Server:
- Run your local server and access the application from
localhost/LAMP-LearnHub
.
- Run your local server and access the application from
The users
table stores user information for authentication and profile details.
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
The courses
table contains information about each course available on the platform.
CREATE TABLE courses (
course_id INT AUTO_INCREMENT PRIMARY KEY,
course_name VARCHAR(100) NOT NULL,
course_description TEXT,
course_image VARCHAR(255),
course_price DECIMAL(10, 2),
course_duration VARCHAR(50),
category1 VARCHAR(50),
category2 VARCHAR(50),
creator_id INT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
- Home Page: Browse available courses and categories.
- User Authentication: Sign up or log in to save view all courses and unlock additional features.
- Explore Courses: View detailed course content, pricing, and other information.
The application is hosted on InfinityFree.
The application deployed link Learnhub.
- Upload Files: Transfer project files via FTP or the InfinityFree file manager.
- Set Up Database: Use InfinityFree’s MySQL management tool to create your database and import tables.
If you would like to contribute:
- Fork the repository.
- Create a new branch for your feature or fix.
- Submit a pull request.