Wednesday, November 21, 2018

Timesheet Management System Project in PHP & MySQL


Almost all the Companies or Businesses are using Timesheet for various reasons and in different formats. Some of them are using papers and Pens as their timesheet, some of them will be using spreadsheets, and some of them are using timesheet Software.

Among all types of Timesheets, implementation of the timesheet in the form of Software is the most useful one. Initially using timesheet as a software may be looking like a bit difficult task comparing to the other methods. But in the long run, it will become very easy and it provides a lot of advantages over other approaches. Especially, we can view the historic Timesheet Reports in the desired manner to study Employee performance as well as Project Performance.

Timesheet Software is available in various formats. People can use some kinds of Timesheet software by installing them in their computers as a Desktop application. But they can not access the desktop timesheet Software from some other locations. Web based Timesheet Software addresses this issue by allowing users to access their timesheet from anywhere in the World.

If you are not familiar with Timesheet application, you have to watch this video.

In this post, I will tell about creating Timesheet Management System in PHP and MySQL.


There is a huge demand for Timesheet system development. Because most of the companies have to implement the timesheet system for various reasons, like Employee Attendance, Project Management, Client Billing, etc. But the cost/price of the timesheet service is very high. Because the companies have to pay for every user and for every month or year.

Generally, Timesheet is the number of Work Hours entered by each Employee for each Project on each Day.

So, we have to create a timesheet table in MySQL Database to store these details.
We need to create the timesheet table with below columns.

id->Primary key with Auto Increment.
Project_id-> foreign key of Projects table
Employee_id-> foreign key of Employees table
date->  for storing date for which we are entering work hours
work_hours-> for storing work hours in numbers with a decimal point
comments-> text comments
status ->Varchar for storing various statuses like pending, approved

These are the basic columns to be created for the timesheet table. But additionally, we can create columns for storing the details about last modified users and last modified date/time. And, we need to add a few more columns if we decide to store the exact start time and end time of the Work Hours.

And, apart from this timesheet table, we need to create Projects Table, Employees table and another table for storing details project assignment.

We need to create config.php file to store MySQLi connection details, and we need to include it in each and every php file.

We have to create a header file to include common things like Menu links

All the CSS style definitions need to be included in a separate CSS file.


We have to define the various user roles  (e.g user, admin, etc) properly and the script should get the user role while registering the user.  While doing the log in the id and usertype of the user need to be stored in some Session or Cookie variable so that it can be accessed from other pages, and features and navigation need to be adjusted based on these Session/cookie variables.

 These variables should be cleared in the logout page.

Every company is having their own way of implementing the work flow or approval of timesheet system. We need to use the status column of timesheet table to handle this.

We need to carefully handle the time/date format because incorrect use of the format may not give any error message and the data will be incorrect which will spoil the core purpose of the timesheet.

The users may not enter the timesheet at once. So, we need to provide a save or draft feature while entering the timesheet. And, all the entered details need to reloaded when making correction or when submiting the timesheet.

Apart from timesheet entry, Reporting is this the key feature of the timesheet management system. It should allow the users to see the timesheet report by filtering it with various parameters like Employees, Projects and Date Range. And, the report needs to calculate and show the budget details also so that we can study the effectiveness of the Employees and Projects.

FPDF library can be used for exporting the report into pdf format.  Even if we use the library, we have do a lot of manual coding work to make it work.

Though the Timesheet system is a simple application, there are many subtle things we need to handle during the development of PHP & MySQL timesheet system. We realized this fact while  updating our timesheet for many years.

If your company, business  or client is requiring a timesheet script, instead of spending all your efforts to develop it from scratch, you can think about buying our Timesheet to save a lot of time. Since we provide the script with source code you can do any kind of changes easily. If you are not familiar with php, we can do the changes for an affordable price.

Price of our Timessheet is very affordable. And, I can give further Discount for the small businesses and students/beginners who are developing timesheet for their clients. But whoever buying our timesheet should use it for their own company or for 1 or 2 clients only. It should not be sold online or any public market places as competion for us. Anyway, you can sell it to few of your own clients.


No comments:

Follow By Email