The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
DD (01-31)
MM (01-12)
YYYY (2005 - 2010)
How do I get these to default to the current date?
> That'll do it. You'll have to repeat the IF statement for each month
> though, and I'm not sure how the leap year affects it. You can just
> put 29 I suppose, it doesn't matter.
>
Why would you need to repeat it for each month? In fact I don't even understand your reasoning for doing it once.
Might also need to add 1 to the $end in the WHILE statement, or it might stop one short - can't remember off the top of my head if it counts it or not. Hope it works/helps.
$this_month = date("M");
$start = 1;
while($start < 31)
{
if($start == $this_date)
{ print(""); }
else
{ print(""); }
$start++;
}
It also validates the date - i.e. won't accept an illegal date.
DD (01-31)
MM (01-12)
YYYY (2005 - 2010)
How do I get these to default to the current date?