co.ador Posted April 21, 2010 Share Posted April 21, 2010 I Have the script below that returns the time in the screen for users. But there is a problem that it won't refresh as the second runs at least there is a F5 manual refresh to the browser!. <?php $currentdate = date("F j, Y,"); $currenttime = date( "h:i:s A"); echo " Current Date: $currentdate<br> Current Time: $currenttime<p>"; ?> Link to comment https://forums.phpfreaks.com/topic/199212-script-to-refresh-the-returned-time-as-the-second-runs/ Share on other sites More sharing options...
trq Posted April 21, 2010 Share Posted April 21, 2010 What? Link to comment https://forums.phpfreaks.com/topic/199212-script-to-refresh-the-returned-time-as-the-second-runs/#findComment-1045547 Share on other sites More sharing options...
co.ador Posted April 21, 2010 Author Share Posted April 21, 2010 Sorry I wanted to put a live running clock without having to refresh the browser to update the time every time to know the actual time. The script in the first post will return the time but it won't automatically keeping refreshing unless clicking F5 Link to comment https://forums.phpfreaks.com/topic/199212-script-to-refresh-the-returned-time-as-the-second-runs/#findComment-1045549 Share on other sites More sharing options...
mrMarcus Posted April 21, 2010 Share Posted April 21, 2010 What? lmao. i must have read that post five times and each time was still left saying, "what?" @co.ador look into javascript/AJAX for auto page-refreshing functions. OR, you can look into sleep Link to comment https://forums.phpfreaks.com/topic/199212-script-to-refresh-the-returned-time-as-the-second-runs/#findComment-1045551 Share on other sites More sharing options...
co.ador Posted April 22, 2010 Author Share Posted April 22, 2010 thank you guys! Thejavascript/ Ajax is a good option to look at. Co.ador Link to comment https://forums.phpfreaks.com/topic/199212-script-to-refresh-the-returned-time-as-the-second-runs/#findComment-1046359 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.