Skip to main content

Simple Online Leave Management System using PHP/MySQL with Source Code


Project: Simple Online Leave Management System using PHP/MySQL


The Simple Online Leave Management System using PHP/MySQL is a PHP/MySQL project that manages the employee's leave records of a certain company. This system allows the employees to apply their leave applications online. With this feature, the employee will automatically limit the application by their leave credits available annually, which means that the leave credits of each employee will be refreshed every year and by that the calculations of consumed leave credits will base manually. The leave management system containing the list of an employee with their department and position, with the help of this list, the admin can manage the employee that can approve or decline an application. The employee that has the privilege to approve and decline a certain employee are those who have the role of Principal, Department head, Manager, and Supervisor. The said roles have their own privilege which is the Principal acts as the top rank role that can approve or decline anyone's leave application of the employee in the company, and the Department Head will be restricted only to apply an action for the leave applications under of his/her department, and the manager and Supervisor are restricted only to the employees assigned to them. In the application form, the system will automatically calculate the range of the date that the employee applied and limited to available leave credits of a certain employee. The system will not accept an application if the application dates are different years, and this means the employee must separate to another leave application for the other year, For example, the employee will apply for leave starting December 28, 2019 - January 2, 2020, in this scenario the employee will create 2 leave applications, 1 is for December 28-31, 2019 and the other for January 1-2, 2020. This example scenario applies also if the range of the dates has a non-working day or employee's day off between the dates because the system doesn't have a feature that stores the employee's schedule and company's working days.


Admin Side

  • Department List
    • This is the page where the admin will populate all the departments of the company.
  • Position List
    • The page where all positions by the department of the company are listed and can be managed.
  • Leave Type Page
    • The page where all types of leave that the company provides to their employees are listed and managed.
  • Employee List
    • On this page, the admin will store all the employees of the company according to their department, position, and under by their managers and supervisors.
  • Leave Applications Page
    • The page where all employees leave application is listed but the admin can only view this page.

Employees Side

  • New Application Modal
    • The popup modal in the system where the employee will fillup the form of their leave application.
  • My Application Page
    • The page where the employee's leave application is listed and be managed.
  • Leave Application Page
    • The page that only restricted to the Principal, Department head, Manager, and Supervisor. This the page where they can approve or decline the application of an employee under them.

Both Sides

  • Login Page
    • The page where system users will submit their system credentials to access the system. Note, when adding an employee in the system, the system will automatically create the employees credential using the first letter of the employee name + last name + '_' + employee ID as the username and employee ID as the default password of the employee, the employee can change their credentials when they already logged into the system.
  • Home Page
    • The page where all users will be redirected after login into the system.

How to Run

  1. Download the source code and extract the zip file.
  2. Download or set up any local web server that runs PHP script.
  3. Open the web-server database and create a new database name it leave_db.
  4. Import the SQL file located in the database folder of the source code.
  5. Copy and paste the source code to the location where your local web server accessing your local projects. Example for XAMPP('C:\xampp\htdocs')
  6. Open a web browser and browse the project. E.g [http://localhost/leave-management-system

Admin Default Access

Username: admin

Password: admin123

I hope that this Simple Online Leave Management System project will help you with what you are looking for.

Explore more on this website for more tutorials and source codes.


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 byBrewology (not verified)on Mon, 11/23/2020 - 10:26

Hi Does you Database incomplete? please response. TY
Submitted byAnonymous (not verified)on Wed, 02/24/2021 - 13:44

Add Automatic mailing notification system so that the employer will know that any of his applied for leave or not as the employer may be in a busy schedule so if there is no notification he may forgot to check the leave approval so in last minute employee may face some problem
Submitted byAndrew 2020 (not verified)on Fri, 02/26/2021 - 12:34

When records more than 10 .. on page 2 or page 3. The edit function is not working. How to resolve?

Add new comment