Hello, im having problems with the following code and it driving me made trying to find out the source to it not working out that one number is bigger than another when clearly it is, please can you help and make my day :)
Example of numbers im comparing...
08072011050724
09072011050724
it works with less than but not greater than but it needs to be greater than in order to be classed as expired.
it doesn't seem to think 09072011050724 is larger than 08072011050724
// CHECK FOR TOKEN EXPIRATION
$request = "SELECT * FROM `linklogic_tokens` WHERE `token` = '$token'";
$actions = mysql_query($request, $connect) or die(mysql_error($connect));
$row = mysql_fetch_assoc($actions);
if ($row['expires'] != 'false'){
$request = "SELECT * FROM `linklogic_tokens` WHERE `token` = '$token'";
$actions = mysql_query($request, $connect) or die(mysql_error($connect));
$row = mysql_fetch_assoc($actions);
if ($row['expires'] >= $timestamp){ //This is causing the problem..i think
$request = "DELETE FROM `linklogic_tokens` WHERE `token` = '$token'";
$actions = mysql_query($request, $connect) or die(mysql_error($connect));
die('Token specified has expired.');
}
}
Kind Regards,
Nathaniel Blackburn