I'm trying to check my string $when to ensure it's not 30 days+ into the future based on the current time(), but also not less than the current time(). For some reason strtotime is causing some sort of issue. Any suggestions on how to make this script function?
<?php
$when = '2011/07/11 11:22:52';
if ($when > strtotime('+30 days', time()));
{
echo "too far into the future";
header('Refresh: 10; URL=page.php');
die();
}
if ($when < time());
{
echo "less than current time";
header('Refresh: 10; URL=page.php');
die();
}
echo "pass";
header('Refresh: 10; URL=page.php');
die();
?>