My first PHP project
View Single Post
11-05-2009, 05:59 PM
Join Date: May 2009
You can probably, do it entirely with PHP. Having a button you click which creates a row in your database like:
[ID: 1][Start: 1257443698][End: /Empty/]
When you click the button again, it would put the end time on the newest entry (one with highest id, or you could take the one with the most recent "Start):
[ID: 1][Start: 1257443698][End: 1257443720]
From there's it's pretty easy to calculate the difference. :)
Begins counting in seconds..
AJAX which puts the session into the database, i.e.:
[ID: 1][Date: 1257443698][Time(Seconds): 732]
From there it's also pretty easy to play with! :)
I'm not entirely sure what you mean by the other ones, but I hope above can work out for you! The code should be pretty simple, and you learn best by doing it yourself, and then get support here.
View Public Profile
Send a private message to Sirupsen
Visit Sirupsen's homepage!
Find More Posts by Sirupsen