apw Posted September 17, 2009 Share Posted September 17, 2009 Hello i created an image called upgrade, also two fields in my database: starttime and endtime. When my happy player clicks on that button, i need the exact time the player did this, i also need an extra 15-minutes to be added to that time the happy player clicked the upgrade button. Can someone explain how this would be done? Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/174597-help-please-datetime/ Share on other sites More sharing options...
apw Posted September 17, 2009 Author Share Posted September 17, 2009 Im actually trying just find the current time the player click the upgrade button then whatever time that is to add 15-minutes to that time so when the 15-minutes passes the player gets the upgrade! Any suggestions Quote Link to comment https://forums.phpfreaks.com/topic/174597-help-please-datetime/#findComment-920319 Share on other sites More sharing options...
mikesta707 Posted September 17, 2009 Share Posted September 17, 2009 $time = date("H:i:s"); $newtime = date("H:i:s", strtotime("+15 minute")); echo $time."<br />".$newtime; returns the following (eastern standard time) 16:36:37 16:51:37 that is the time now, 15 minutes from now is that what you want? Quote Link to comment https://forums.phpfreaks.com/topic/174597-help-please-datetime/#findComment-920325 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.