Online Exam System in PHP using CodeIgniter Free Source Code



This simple project is an Online Examination System, a web-based application developed using PHP, CodeIgniter, and the MySQL Database. The PHP CodeIgniter Project offers an Online Examination platform for students in specific colleges or universities. This web application provides an effortless and efficient method for creating and conducting examinations. It encompasses multiple pertinent features and functionalities for both students and lecturers or faculties. The system boasts a pleasant user interface achieved through the utilization of Bootstrap Framework, AdminLTE Template, and other libraries, ensuring an enhanced user experience. Additionally, it incorporates user-friendly features and functionalities.

About the Online Examination System

This Online Examination System Project has been developed with the following:

  • XAMPP v3.3.0
  • PHP
  • CodeIgniter
  • MySQL Database
  • HTML
  • CSS
  • JavaScript
  • Ajax
  • jQuery
  • Bootstrap
  • Font Awesome
  • AdminLTE
  • DataTables

The Online Examination System Project in PHP Codeigniter requires valid and registered users to gain access to the system's features and functionalities. This application has three different user roles: Administrator, Lecturer/Faculty, and Student. Each of these roles comes with distinct restrictions and permissions.

The Administrator User holds the privilege of accessing and managing all administrative or managerial features and functionalities. They can also manage the list of system users. Administrators are responsible for adding information about faculty and students to the system. They are also the ones who can grant user access to both Lecturers and Students. Additionally, they have the privilege to access Exam Results, Add Questions for Lecturers, and Clear all data in the database.

The Lecturer or Faculty member has limited access to features and functionalities. They can add questions for the classes or courses they are handling. Lecturers have the privilege to create or conduct exam sets. They can create a new exam with relevant information such as the Exam Title and Schedule. Faculty members can also view and print Exam Results per Exam Set. They have access to view student result information for each exam set.

The Student user has the fewest features and functionalities within the system. Student users' primary purpose for accessing the system is to take exams created by their faculties or lecturers. They can only take the examination if it is still available and only once. Each exam set has a timer set by the Lecturer, which only allows them to finish the exam within a certain time duration. If the countdown or timer reaches zero and the student has not finished taking the exam, the system will automatically submit the student's completed answers.



  • Dashboard Page
    • Display the summary of the list.
  • Department Management
    • Add New Multiple Department
    • List All Departments
    • Edit/Update Department Details
    • Bulk Deletion of Department
    • Import Department
    • Print Department
    • Export Department
    • Copy Department
  • Class Management
    • Add New Multiple Class
    • List All Class
    • Edit/Update Class Details
    • Bulk Deletion of Class
    • Import Class
    • Print Class
    • Export Class
    • Copy Class
  • Course Management
    • Add New Multiple Course
    • List All Courses
    • Edit/Update Course Details
    • Bulk Deletion of Course
    • Import Course
    • Print Course
    • Export Course
    • Copy Course
  • Lecturer Management
    • Add New Lecturer
    • List All Lecturers
    • Edit/Update Lecturer Details
    • Bulk Deletion of Lecturer
    • Generate Lecturer System Credential
    • Import Lecturer
    • Print Lecturer
    • Export Lecturer
    • Copy Lecturer
  • Student Management
    • Add New Student
    • List All Students
    • Edit/Update Student Details
    • Bulk Deletion of Student
    • Generate Student System Credential
    • Import Student
    • Print Student
    • Export Student
    • Copy Student
  • Relation Management
    • Setting Multiple Class for Lecturers
    • Setting Multiple Departments for Class
  • Question Management
    • Add New Question
    • List All Questions
    • Edit/Update Question Details
    • Delete Question
    • View Question Details
    • Add File Per Question
    • Add File Per Question Option
  • Reports
    • List All Exams
    • View Exam Results
    • Print or Download Exam Result
  • User Management
    • List All Users
    • Edit/Update User Details
    • Delete User
    • Import User
    • Print User
    • Export User
    • Copy User
  • Update Account Details/Credentials
  • Clear All Data in the Database (except the admin user)
  • Login and Logout

Lecturer or Faculty

  • Login
  • Add New Exam Set
  • List All Exam Set
  • Edit Exam Set
  • Delete Exam Set
  • Re-generate Exam token
  • View Exam Result
  • Download or Print Exam Result
  • Update System Account Credential
  • Logout


  • Login
  • List All Exam Set
  • Take Exam
  • Mark Question as Doubt for Reviewing Before Submit
  • View Exam Result
  • Exam Timer
  • Exam Countdown
  • Update System Account Credential
  • Logout

The source code was developed only for educational purposes only. You can download the source code for free and modify it the way you wanted.

System Snapshots of some Features

Login Page

Online Examination System

Admin Dashboard Page

Online Examination System

Admin User List Page

Online Examination System

Lecturer Exam List Page

Online Examination System

Lecturer Exam Result Page

Online Examination System

Student Exam List Page

Online Examination System

Student Take Exam Page

Online Examination System

How to Run?


  • Download and Install any local web server such as XAMPP.
  • Download the provided source code zip file. (download button is located below)

System Installation/Setup

  1. Open your XAMPP Control Panel and start Apache and MySQL.
  2. Extract the downloaded source code zip file.
  3. Copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory.
  4. Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin
  5. Create a new database naming exam_db.
  6. Import the provided SQL file. The file is known as exam_db.sql located inside the database folder.
  7. Browse the Online Examination System in a browser. i.e. http://localhost/ci_exam/.

Admin Default Access:

Email: [email protected]
Password: admin123


That's it. You can now explore the features and functionalities of this Online Examination System in PHP using CodeIgniter Framework. I hope this will help you with what you are looking for and you'll find something useful for your future projects.

Explore more on this website for more Free Source Codes and Tutorials.

Enjoy :)

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 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 byMostafa Ahmed … (not verified)on Fri, 07/15/2022 - 22:50

hello there i have aproplem when setting time it gose with additional 6 hours could you please help me
Submitted byLeoman Alves M… (not verified)on Fri, 07/22/2022 - 21:24

Good job! I have a mistake. How can I link a Exam (Quiz) to a student ?
Submitted byDiekola (not verified)on Tue, 11/01/2022 - 22:08

Error SQL query: Copy -- -- Constraints for table `mahasiswa` -- ALTER TABLE `mahasiswa` ADD CONSTRAINT `mahasiswa_ibfk_2` FOREIGN KEY (`kelas_id`) REFERENCES `kelas` (`id_kelas`) ON DELETE CASCADE; MySQL said: Documentation #1452 - Cannot add or update a child row: a foreign key constraint fails (`exam_db`.`#sql-115c_2f`, CONSTRAINT `mahasiswa_ibfk_2` FOREIGN KEY (`kelas_id`) REFERENCES `kelas` (`id_kelas`) ON DELETE CASCADE)
Submitted bySuryawanshi Rajesh (not verified)on Sun, 12/04/2022 - 18:58

by default timing is 2hr please help me how to adjust custom time
Submitted bySuryawanshi Rajesh (not verified)on Sun, 12/04/2022 - 19:05

Exam timing is by default please help me here for custom timing
Submitted byGemechis Wakweya (not verified)on Thu, 01/05/2023 - 01:35

I am very glad to see this project and i'm gonna customize and use it by my side Thank You!
Submitted byravi kiran (not verified)on Tue, 06/20/2023 - 19:18

how to login the lecturer and students.. passwords were encrypted.. please help
Submitted byGoodness (not verified)on Sat, 08/12/2023 - 18:56

Error SQL query: Copy -- -- Constraints for table `mahasiswa` -- ALTER TABLE `mahasiswa` ADD CONSTRAINT `mahasiswa_ibfk_2` FOREIGN KEY (`kelas_id`) REFERENCES `kelas` (`id_kelas`) ON DELETE CASCADE; MySQL said: Documentation #1452 - Cannot add or update a child row: a foreign key constraint fails (`exam_db`.`#sql-1660_3d`, CONSTRAINT `mahasiswa_ibfk_2` FOREIGN KEY (`kelas_id`) REFERENCES `kelas` (`id_kelas`) ON DELETE CASCADE)
Submitted byJames787 (not verified)on Thu, 11/16/2023 - 11:55

Is there a way to print out the exam results with an exam report of all the questions done by each student, the answers they selected and whether the answers were right or wrong?
Submitted bybrian787on Thu, 11/16/2023 - 15:12

How do you view the questions attempted by a student after submitting their exam, including the multiple choices, answers selected and correct answers?

Submitted byMAHESH BADGUJAR (not verified)on Sat, 01/27/2024 - 20:17

Can anybody tell me how can i login for student and lecturer ?
Submitted byShankar658 (not verified)on Sun, 02/04/2024 - 14:55

In reply to by MAHESH BADGUJAR (not verified)

I have the same issue here... If you have it resolved kindly update
Submitted byGlarr (not verified)on Thu, 05/09/2024 - 09:39

Thank you Guys.. Communication, information and Sharing of Knowledge, is one of the best and latest human revolutions in the history of mankind. You are not doing it for nothing, it will have an impact to many others.

Add new comment