<?php
$currentDate = date("");
$expiry_date = date('14-03-2010');
if($currentDate <= $expiry_date) {
echo '<a href="apply.php">Apply Online</a>';
}
else echo 'Apply Closed';
?>
Problem is that when I change my system date to i.e 18-03-2010 it does not disply
'Apply Closed'.
please help so solve my code?
Adil
PHP Code Help?
Moderator: General Moderators
Re: PHP Code Help?
Code: Select all
<?php
$currentDate = date("");
[color=#FF0000]*** INSERT an echo "current date: ".$currentDate HERE and look for what are you getting **[/color]
$expiry_date = date('14-03-2010');
if($currentDate <= $expiry_date) {
echo '<a href="apply.php">Apply Online</a>';
}
else echo 'Apply Closed';
?>