here is my bit of code..
$time = $row['TIME'];
echo "time=$time&";
$timeneeded = mktime('0', '20', '0', '0', '0', '0');
$now = mktime();
if($now >($timeneeded+$time)){
echo 'yes!! Time is up!';
}else{
echo 'no!! Still gotta wait a bit!';
}
I'm trying to make a statement that.. will check to see if the required amount of waiting time has passed or now.. So.. First.. I've written a MySql query that has written the time they first started..
Then.. later when they run this php.. it should tell them if the required amount of waiting time has passed yet or not..
$timeneeded = mktime('0', '20', '0', '0', '0', '0');
This line of code is the time they need to wait.. so.. it's 20minutes here..
if($now >($timeneeded+$time)){
This bit here.. is saying... if the time now.. is greater than the "time you logged in plus the waiting time" then it should echo YES!
However! This isn't working!
The MySql writes the time in this format.. "2008-03-11 18:21:49"
While php writes in this format! .. "1205215154"
Which is really confusing!
lol Basically.. I just need a bit of code that will check if the waiting time has expired yet or not..
Anyone know how to write it?