I forgot always do my books on time in the book library, so I want to make a script with the next parameters:
$datefield: when i do the book in the library
curdate: the date of today
$deadline: the date when books must be in the library
So, i try to make this in theorie:
When $datefield = empty AND the deadline is over a month (or the curdate is less than 1 month of the deadline): than echo: lless than 1 month
if((empty($datefield)) and curdate < ($deadline - 0))
{
echo "<p><b><font color=\"#FF0000\">to late</font></b></p>";
}
elseif((empty($datefield)) and curdate < ($deadline - 2419200))
{
echo "you have less than 1 month";
}
elseif((empty($datefield)) and curdate < ($deadline - 2419200))
{
echo "you have less than 6 month";
}
elseif((empty($datefield)) and curdate > ($deadline - 24192000))
{
echo "Time enough";
}
elseif(!empty($datefield))
{
echo "ok";
}
Who can help me?