mg7282 Posted February 28, 2011 Share Posted February 28, 2011 I am looking to build a live auction website. I understand that AJAX will play a major role in the timer/bids functionality. Can someone explain the flow of this process. Time is ticking, someone bids with their bought bids, this ups the timer by 10 seconds... How should this be developed so that anyone who is watching the auction is constantly seeing the same thing? Quote Link to comment https://forums.phpfreaks.com/topic/229162-live-auction-timer/ Share on other sites More sharing options...
punk_runner Posted March 1, 2011 Share Posted March 1, 2011 Store the amount of time left as an integer in the database, as a UNIX timestamp so it is in seconds. Each time 10 seconds is added just add it to that number... $newTime = $oldTime + 10; You can use Axax to update the page every 5 seconds or so... Quote Link to comment https://forums.phpfreaks.com/topic/229162-live-auction-timer/#findComment-1181041 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.