Hi,
How to make time counter.
Suppose i purchased one item online, After that instance time starts decreasing cos he has given the time bound (like after purchase time item available only for 48 hours like that) So how it sets and how it decreases?
Setting the time i know by using time() function but how to make it timer?
Can anybody help me from this?
Thank YOu
how to make time counter in php
Moderator: General Moderators
- andym01480
- Forum Contributor
- Posts: 390
- Joined: Wed Apr 19, 2006 5:01 pm
thank you
HI
Thank YOu ... but again a small doubt how can i set that as <48 hours?
cos see this is the time stamp like time(). I'm using this fucntion to store the time of purchase can i use this as time<48 what is this convention to take it as <48 will it take as hours when we mention this?
Thank YOu..
Thank YOu ... but again a small doubt how can i set that as <48 hours?
cos see this is the time stamp like time(). I'm using this fucntion to store the time of purchase can i use this as time<48 what is this convention to take it as <48 will it take as hours when we mention this?
Thank YOu..
- andym01480
- Forum Contributor
- Posts: 390
- Joined: Wed Apr 19, 2006 5:01 pm
No.
time()
Now if you are really smart you can do that as a mysql query. - perhaps someone else will show how. Too early in the morning for me to work that out!
time()
So you need to check the current time is <= the time from the database + 172800 (which is 48hrs*60mins*60secs!)Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
Now if you are really smart you can do that as a mysql query. - perhaps someone else will show how. Too early in the morning for me to work that out!