E-Learning System Using PHP/MySQLi with Source Code


E-Learning System is a web-based system that aims to make the role of teachers easier in making their lessons, activities, and quizzes. The function of this is, the teacher can upload his lesson whether it’s a video or a pdf file. He can also set questions of quizzes or activities based on the lesson that he uploaded. The students need to create an account first so they can log-in and they can now view the lesson and take the quiz. And if the student already has an account he/she can access to download and view the videos/pdf files.

These are the following features of the system:

Admin Side


  • List of Lessons
  • Upload Lesson
  • Edit Lesson
  • Change the File
  • View Lesson
  • Delete Lesson


  • List of Question
  • Add Question
  • Edit Question
  • Delete Question


  • List of Students

Manage Users

  • List of Users
  • Add User
  • Edit User
  • Delete User

Student side

  • Create Account
  • Login and Logout
  • View Lesson
  • Take Quizzes
  • Generate Score
  • Download Lessons

How to set up the E-Learning System in PHP with Source Code

  1. Download the zip file.
  2. Download and install XAMPP
  3. Run the XAMPP control panel and start MySQL and Apache
  4. Go to C:\xampp\htdocs and extract the downloaded zip file ( caiwl) inside the folder
  5. Open the browser and go to http://localhost/phpmyadmin/ to create the database
  6. Click the new to create a database.
  7. Name the database "dbcaiwl"
  8. Click Import to import the SQL file.
  9. Click choose file and select the dbcaiwl in the root folder of the source code
  10. Click go.

How to run E-Learning System in PHP with Source Code

Open the browser and go to :

http://localhost/caiwl/ - for Students

http://localhost/admin/ - for Admin

Accessing Admin Side

Username: janobe
Password: admin

For more information about the system, you can contact me @

Email – [email protected]
Mobile No. – 09305235027 – TNT

Or feel free to comment below.

This E-Learning System in PHP with Source Code is for educational purposes only. You can download it as a reference and expand your knowledge in making a system. You can freely modify it, according to your desire.

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Submitted byDemzzz (not verified)on Fri, 12/14/2018 - 00:19

I can't connect to the database, the error prompt "Problem in selecting database! Contact administrator!" just when I set the password to null. But when I did not delete the password the error prompt like this: " (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\caiwl\include\database.php on line 19 Problem in database connection! Contact administrator". Pls help
Submitted byjanobeon Wed, 04/24/2019 - 11:34

In reply to by Demzzz (not verified)

Please remove the password in the config.php file
Submitted byMick alienhu (not verified)on Sun, 05/17/2020 - 00:05

In reply to by Demzzz (not verified)

C:\xampp\htdocs\caiwl\include\database.php go to this file and edit ('localhost','root',' ','table name');
Submitted byAubrey Drake (not verified)on Fri, 12/14/2018 - 01:30

I cannot login using the username: janobe & pass: admin.
Submitted bymrdio (not verified)on Sat, 04/06/2019 - 12:48

Warning: mysqli_connect(): (HY000/2002): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\xampp\htdocs\CAIWL\include\database.php on line 19 Problem in database connection! Contact administrator!
Submitted byjanobeon Wed, 04/24/2019 - 11:33

http://localhost/caiwl/admin/login.php use this url to open the admin side of the system and login the given details above.
Submitted byAnonymous (not verified)on Mon, 07/01/2019 - 14:52

I also cannot login using the username: janobe & pass: admin. Kindly advise. It show "Account does not exist! Please contact Administrator."
Submitted bycsentus (not verified)on Thu, 11/14/2019 - 19:27

your idea is good and i am currently learning PHP. pls i need the login details for student
Submitted byanitha maran (not verified)on Fri, 02/14/2020 - 14:54

Warning: require_once(C:/xampp/htdocs\CAIWL\include\config.php): failed to open stream: No such file or directory in C:\xampp\htdocs\el\lms\E-Learning Management System\include\initialize.php on line 14 Fatal error: require_once(): Failed opening required 'C:/xampp/htdocs\CAIWL\include\config.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\el\lms\E-Learning Management System\include\initialize.php on line 14 I get the above error when i run this code..please help me sir.
Submitted byarifzazli (not verified)on Sat, 05/30/2020 - 12:57

thank you for sharing. i successfully run it and currently edit it to match my design n requirement. what ive done to run it same like janobe instructions: 1. install xampp 2. create dbcaiwl using localhost/phpmyadmin 3. access it at browser.. localhost/caiwl/login.php <------ for student...just create your account then play arround with it. 4. then use localhost/caiwl/admin/login.php to access admin view <----- this one use janobe/admin as told by janobe.... 5. easy right. 6. I use Visual Studio Code to edit the codes..... and just refresh the browser to view the results of edited codes.
Submitted byhafsazk (not verified)on Sat, 09/05/2020 - 06:19

Problem in selecting database! Contact administrator!
Submitted bykdhanamjayon Tue, 12/29/2020 - 18:59

Not Found

The requested URL /caiwl/caiwl/login.php was not found on this server.


what ever you upload a video.same to same i did but it is getting like that and even css also not properly showing


i am using wamp server

Submitted bySteven Moo (not verified)on Wed, 04/14/2021 - 14:33

In reply to by kdhanamjay

Careful with the directory folder naming. search the initialize.php under the include folder. defined('SITE_ROOT') ? null : define ('SITE_ROOT', $_SERVER['DOCUMENT_ROOT'].DS.'caiwl');
Submitted bymissN (not verified)on Mon, 01/04/2021 - 23:54

Warning: require_once(C:/xampp/htdocs\caiwl\include\config.php): failed to open stream: No such file or directory in C:\xampp\htdocs\E_SISPA\caiwl\caiwl\include\initialize.php on line 14 Fatal error: require_once(): Failed opening required 'C:/xampp/htdocs\caiwl\include\config.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\E_SISPA\caiwl\caiwl\include\initialize.php on line 14 please help me ;'(
Submitted bySonu d (not verified)on Wed, 02/10/2021 - 04:20

Hello, first of all you did a great work here, but i think at admin side you should have shown exercises score
Submitted byManoj Indiran (not verified)on Thu, 02/25/2021 - 13:55

Hi, this is Manoj Indiran. I also workout this E-Learning portal, It's working. If you want my project with source code means, message me in what's app. I can help you, My project Cost is Rs.2000/- only. Thank you What's app number : 9600531670
Submitted byRajeshwaran (not verified)on Sun, 04/04/2021 - 00:51

IT showing error first fix this and the ask for sale Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in D:\Program Files\xampp1\htdocs\caiwl\include\database.php:14 Stack trace: #0 D:\Program Files\xampp1\htdocs\caiwl\include\database.php(130): Database->__construct() #1 D:\Program Files\xampp1\htdocs\caiwl\include\accounts.php(2): require_once('D:\\Program File...') #2 D:\Program Files\xampp1\htdocs\caiwl\include\initialize.php(17): require_once('D:\\Program File...') #3 D:\Program Files\xampp1\htdocs\caiwl\index.php(2): require_once('D:\\Program File...') #4 {main} thrown in D:\Program Files\xampp1\htdocs\caiwl\include\database.php on line 14
Submitted bymohammed peepa (not verified)on Thu, 07/01/2021 - 01:18

Notice: Trying to get property 'Answer' of non-object in C:\wamp64\www\caiwl\quizresult.php on line 34 This error is occurring when i open exercise section and click on submit
Submitted byBadaru Abdulwa… (not verified)on Sat, 10/16/2021 - 02:42

Sir, it;s not opening Not Found HTTP Error 404. The requested resource is not found.
Submitted byToshi (not verified)on Sun, 04/17/2022 - 16:28

Problem in database connection! Contact administrator! I have made changes in Config and Database file but still, error is the same as we upload on the live server the database is created as domainname_dbname so the given database doesn't work please help me how to connect on live server the database.
Submitted bysanuda (not verified)on Wed, 05/25/2022 - 14:07

Warning: require_once(/storage/ssd5/476/18987476/public_html/caiwl/include/config.php): failed to open stream: No such file or directory in /storage/ssd5/476/18987476/public_html/include/initialize.php on line 14 Fatal error: require_once(): Failed opening required '/storage/ssd5/476/18987476/public_html/caiwl/include/config.php' (include_path='.:/usr/share/pear:/usr/share/php') in /storage/ssd5/476/18987476/public_html/include/initialize.php on line 14
Submitted byAndrew, Samuel A (not verified)on Sun, 07/17/2022 - 22:29

The Application is working perfectly. You just to follow the Instructions given by Janobe.
Submitted byAryan Trivedi (not verified)on Fri, 11/04/2022 - 22:03

Fatal error: __autoload() is no longer supported, use spl_autoload_register() instead in C:\xampp\htdocs\caiwl\include\function.php on line 37

Add new comment