Employees Pay Slip PDF Generator System with Email using PHP/OOP Free Source Code



This simple project is an Employees Pay Slip PDF Generator System. This project is a web-based application developed in PHP and MySQL Database. The system provides an online platform for the company to generate the payslip of their employees. Management can directly send the employees' payslips easily without any hassle. This system has a pleasant user interface with the help of Bootstrap and AdminLTE Template. This has user-friendly features and functionalities.

About the Employees Pay Slip PDF Generator System

I developed this project using the following:

  • XAMPP v3.3.0
  • PHP
  • MySQL Database
  • HTML
  • CSS
  • JavaScript
  • Ajax
  • jQuery
  • Bootstrap
  • Font-awesome
  • Bootstrap DataTables
  • AdminLTE Template

These Simple Employees Pay Slip PDF Generator System can be accessed only by the management. The management can store the list of departments and designations/positions in their company. In this system, management can simply encode the employees' pay slips and generate an encrypted PDF file. Aside from generating a pdf file, the management can also directly send the PDF Generated Pay Slips of the employees through email. The system has a default template for the mail to be sent that contains the payroll details and PDF attachment. Generated PDF Pay Slips are encrypted and the password of each file is the company ID or Code of each employee. The PDF File Pay Slip contain also a company logo watermark aside from the employee's payslip details. Email is being sent to employees using Google SMTP.


  • Secure Login and Logout
  • Dashboard
  • Department Management
    • Add new Department
    • List All Departments
    • Update Department Details
    • Delete Department Details
  • Position Management
    • Add new Position
    • List All Positions
    • Update Position Details
    • Delete Position Details
  • Employee Management
    • List All Employees
    • View Employee Details
    • Update Employee Details
    • Delete Employee Details
  • Payroll Management
    • List All Payroll
    • View Payroll Details
    • Update Payroll Details
    • Delete Payroll Details
    • List All Pay Slips
    • View Pay Slips Details
    • Generate PDF Pay Slip
    • Send Generated PDF through Email
    • Update Pay Slips Details
    • Delete Pay Slips Details
  • System User Management
    • Add new System User
    • List All System Users
    • Update System User Details
    • Delete System User Details
  • System Information Management

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


Employees Pay Slip PDF Generator System

Payroll List

Employees Pay Slip PDF Generator System

Payroll Employees Pay Slip List

Employees Pay Slip PDF Generator System

Pay Slip Details Modal

Employees Pay Slip PDF Generator System

Pay Slip Email

Employees Pay Slip PDF Generator System

Generated Pay Slip PDF

Employees Pay Slip PDF Generator System

How to Run ??


XAMPP Mail Configuration

  • Locate your XAMPP's php.ini file and configure it just like the image below. Path (xampp/php)
  • Locate your XAMPP's sendmail.ini file and configure it just like the image below. Path (xampp/sendmail)

Setup Sender's Google Account to send mail locally

  • Go to "Google Account". Note: Login to your sender's Gmail Account.
  • Select "Security" from the Left Side Menu.
  • Scroll Down the Page to "Less Secure App Access"
  • Enable "Allow less secure apps"

System Installation/Setup

  1. Open your XAMPP php.ini file and Enable/Uncomment the GD Library.
  2. Open your XAMPP Control Panel and start Apache and MySQL.
  3. Extract the downloaded source code zip file.
  4. Copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory.
  5. Extract the downloaded plugins zip file.
  6. Copy the extracted plugins folder and paste it into the source code root path.
  7. Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin
  8. Create a new database naming pess_db.
  9. Import the provided SQL file. The file is known as pess_db.sql located inside the database folder.
  10. Browse the Employees Pay Slip PDF Generator System in a browser. i.e. http://localhost/pess/.

Default Admin Access

Username: admin
Password: admin123


That's it. You can now explore the features and functionalities of this Employees Pay Slip PDF Generator System in PHP. 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 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 byMohammed Shouk… (not verified)on Sat, 03/26/2022 - 20:14

Thank you for uploading an excellent app. I have done all the configurations as shown but I'm unable to get the payslip on email. On checking the error.log from apache it shows The system cannot find the path specified. Pls help in resolving this issue at your earliest. Email: [email protected]

Hi Mohammed, for locally using XAMPP the filenames are included in the article under the "How to Run Section" and if you are using different virtual servers, please check the equivalent configuration for the server you are using. Thanks

Submitted byOemar-BGS (not verified)on Fri, 11/11/2022 - 19:52

generate to PDF error, need your advice.
Submitted byARYA CHATURVEDI (not verified)on Tue, 11/15/2022 - 22:44

i followed evey step guid by you yet still login issue... without error
Submitted byEmmanuel001 (not verified)on Thu, 12/01/2022 - 10:42

Login issue: Redirects to login page after entering the username and password as shown above.
Submitted byShenwercaine (not verified)on Tue, 03/07/2023 - 16:24

Is this still possible? I think Gmail Less Secure App Option is already not working. What is the alternative way to send payslip to emails? Thank you
Submitted byPunit Mujral (not verified)on Thu, 03/09/2023 - 15:13

Have a great day
Submitted byRaj kumar5676 (not verified)on Mon, 04/03/2023 - 17:29

Can we able to change the company logo?
Submitted byHarry Bob (not verified)on Tue, 04/18/2023 - 19:47

The default login of admin / admin123 is not working. Can someone please confirm the correct password
Submitted bykhorn (not verified)on Wed, 04/26/2023 - 17:27

generate payslip limited at no.10 payslip per payroll.How to unlimited it
Submitted bysanyxhi (not verified)on Sun, 04/30/2023 - 23:46

the default login of admin is not working, can someone gave me the correct account and password?
Submitted bysefgagr (not verified)on Mon, 05/29/2023 - 10:43

can you make netpay auto calculate
Submitted byHackerton (not verified)on Sun, 06/04/2023 - 12:20

Pls after extraction I was unable to see plugins folder..... Any help pls
Submitted byanonymus (not verified)on Thu, 06/15/2023 - 09:04

delete allowance list at edit section not working
Submitted bysakhorn (not verified)on Thu, 09/28/2023 - 21:25

Thank you for good project. I try to change Page "payslip_list" load more than 50 record. then use click "generate payslip pdf" on action dropdown of each record,On record NO.1-10 can run javascript but over than not run. how to fix this problem.
Submitted byfaizkhan (not verified)on Fri, 11/24/2023 - 04:03

can I use it for my company? if yes, then how can I replace xampp with actual hosting?
Submitted byRishi kesavan (not verified)on Mon, 03/25/2024 - 17:11

Hii there, i can't generate pdf and can't send payslip through Gmail. Can u help with this problem...

Add new comment