markanthonyirosa24 Posted July 29, 2014 Share Posted July 29, 2014 Good day! I'm just a newbie in php and seeking for some assistance with my project as a beginner, as for now i do know how to insert data's in my database, but i'm having problem with this one; Problem: My page requirements is that it must have a button to initiate start time ex. 0:00:00 <-- starting time. Next one is, this page needs to change the amount the client need to pay for ex. For every 1 hr, they should be an amount of 60.00 and for another extended time for ex. 1:01 (1 hour and 1minute) the amount tendered must be 60+55 so total of 115.00. and if the timer hits 1:31 the amount should be in total of 120.00. and so on and so forth. there's a button that will initiate stop time and will automatically save all the data to the database.. I'm researching this for a week now, and trying some functions and codes but nothing worked.. I guess I need to study more harder with php since it's my first time to study this one. Any help will be appreciated.. thanks and god bless! Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted July 29, 2014 Share Posted July 29, 2014 Are you okay with the page reloading each time the button is clicked? If so, you could look into using PHP's Event class for the timer: http://php.net/manual/en/event.addtimer.php However, if you want the button(s) to start / stop the timer without reloading the page, you'll need to use JavaScript. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.