-
Countdown timer
Hi,
I am doing project on online bidding using php. I want to display; product details like image,price (in Euros) and bidder name ,time seconds(00m:00s),
if bidder bid that product (before the time seconds 00:00) the time increased seconds automatically set to 60 seconds and redisplay the username who bid that product .
if the time go to (00:00) the product allotted to last bidder who bid the product..
any Ideas, how to do it??
-
Re: Countdown timer
This is how i would do it:
You have to save the "time" of creation somewhere on your server or database.
And the time of the deadline.
Then when the page loads you use php to compare the time of the deadline with the Unix time. (using "Time" - see link)
http://be2.php.net/time
Or http://be2.php.net/manual/en/ref.datetime.php
That way you can show how much "time" is left untill the deadline.
Whenever someone bids, you just increase the time of the deadline on your server/database by 60seconds.
The next time someone loads the page, php compares the current time with the deadline and sees there are 60 seconds left. :)
Greetz,
Dave
-
Re: Countdown timer
Its good information about countdown timer. People always want to do their project work systematic.