Attendance and Payroll System using PHP

Submitted by: 
Visitors have accessed this post 50374 times.


  • CRUD - Employee Attendance
  • CRUD - Employee
  • Employee Cash Advance
  • Employee Overtime
  • Employee Schedule
  • Payroll on Date Range
  • Payslip on Date Range


  • AdminLTE
  • TCPDF library


1. Download the source code using the Download button below.

2. Extract the downloaded file to your localhost folder ex. htdocs for XAMMP.

3. Import the included .sql file which is the database of the system. If you have no idea on how to import, please refer to my tutorial on How import .sql file to restore MySQL database.

4. After a successful import, open the extracted folder and open conn.php in both the root folder and in admin/includes folder. Edit the database name in the connection depending on the name of database you created in importing the included .sql file.

Accessing the Admin

You can access the admin side by adding /admin/. You should be able to navigate to admin login page.

You can then use the below admin credential:

Username: nurhodelta
Password: password

That's it. You should now be able to run the simple system :)

If you have any suggestions, comments or reactions, feel free to comment below or message me.

Happy Coding :)

*Updates: 05-21-18
1. Fixed dynamic buttons (edit, delete, etc ) not functioning on page2 or more of table.
2. Fixed time in showing late even on time.

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.


thanks sir for the sample code sir

How can the system calculate the overtime

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\htdocs\apsystem_0\apsystem\tcpdf\tcpdf.php on line 17778
TCPDF ERROR: Some data has already been output, can't send PDF file

Hi neovic,

I was eager to learn PHP dashboard concept but all tutorials i followed were not this much elaborated. It's very rare to find very good hearts like you in this world and I am taking this opportunity to thank you and may triple gems bless you and your family.

Please do send me your email to [email protected].

With Best Regards,
Manoj Perera

Hi, how can i run this source code? where? can you help me?

How do I make the punch in and out details shown in same page as punch page?

So, user can see their punch in and out details on the spot. It is like the punch section on the top of page and the details at the bottom of page.

its good keep it up


Thank you for the best source code. How to set width for modal?

great information i received on this site.

This is the error i get wen logging in as an administrator pls help
Fatal error: Call to undefined function password_verify() in C:\wamp\www\apsystem\admin\login.php on line 17

Use Php version 5.5.0 to avoid the problem

Hi, i ran the code in wamp server but the page it viewed is only the employee login asking only two fields time-in or time-out and employee id.when i clicked on the sign-in option it showed "Time - in: 'and the name'" nothing else happened .So what should i have to do to run this project........ pls reply me....

how to add and configure the absent tab

hi,kindly help me with the full documentation of this project.

Fatal error: Call to undefined function password_verify() in C:\wamp\www\Downloaded Projects\apsystem_0\apsystem\admin\login.php on line 17
Call Stack
# Time Memory Function Location
1 0.0000 147984 {main}( ) ..\login.php:0

Fatal error: Call to undefined function password_verify() in C:\wamp\www\Downloaded Projects\apsystem_0\apsystem\admin\login.php on line 17
I am also facing this error

How would i change the background image of the index pages. Please help. Great system by the way.

This system is useless without user mode, I suggest that when the user is login it will only see his/ her information.

Hello. I would like for the employee to be able to login using employee_id and passwd. Employee would be able to view his/her details e.g, attendance records of himself/herself,deductions, cash advance,schedule and position. How do i address this pls help

How can i change the index/login page background color(currently grey-ish) to cover image and which file do i need to go to. Regards

Hey. Have been wanting to change the gray background in login pages to a customized image background. How do i go about it, thanks a lot

Hi. The system doesnt record overtime unless i add it manually. Can it reflect automatically? Pls advise

Hi. When i make changes say with the edit and delete buttons from page 2 onwards, the page always reloads to the first page. How can i make it to remain on the current page after changes. Thank u

Hey. Thanks so much, your earlier feedback worked perfectly for the edit and delete buttons. What should i do about the employee sign in..its now not working or submiting emp id. Ua help will be appreciated.

Hi there. After adding employees or positions and even the attendance..after going to the next page..the edit and delete buttons dont work from the second page. Kindly advise

Just change the button for edit and delete..

For edit:
$(document).on('click', '.edit', function(e){
///the codes here

For delete
$(document).on('click', '.delete', function(e){
///the codes here

Same goes for other dynamic buttons

Can you please further elaborate, why (edit & delete buttons) they are not working on second page.

Please also explain what needs to be changed as advised above.


please help how to debug this problem sir

Hi. I downloaded and wanted to explore this system but i cant login as admin..i used username and pswd in the database and even tried changing several times but it keeps saying incorrect pswd on the admin login page. Pls help

The password is should not have changes the password directly in your phpmyadmin...reset the database again and use the credential provided..there shouldnt be a problem...

Field 'status' doesn't have a default value

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.