Jump to content

Recommended Posts

Hello, I am new to PHP coding so please forgive me if I make any obvious mistakes! I am writing an application that an IT support company can use to log time everytime they visit a customer which will then get the customers 'allocated monthly hour allowance' and remove the time the log from this.

 

It is only a relatively simple app but I am having trouble with the following code that I have attached.

 

The hours are stored in the database in decimal format and I have got the attached code to convert the decimal value into hours and minutes and show it in HH:MM format.

 

I want to be able to split the text box which the IT tech enters their time (currently they still have to enter in decimal format) into two boxes HH and MM so that it is easier for them to do so.

 

I would also like the code to automatically remove this data from the database - currently the code I have written only works out the time left on the maintenance contract if you include the previous hours you have entered. For example - if I had been working somewhere for an hour and a half today but worked three hours yesterday I would have to put 4.5 into the text box. I want to be able to put 1.5.

 

Very sorry if I sound at all thick - this is my first PHP project.

 

Many Thanks in advance!  ;D

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/67931-time-log-app/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.