Hi:
I'm trying to create a dropdown box that lists every month from the current month, to June 2002, and would automatically add another option each month.
Here's what I have, but it doesn't work:
$today = getdate();
$mon = $today['mon'];
$year = $today['year'];
do {
$date = date ("F Y", mktime (0,0,0,$mon,1,$year));
$var = date ("m-Y", mktime (0,0,0,$mon,1,$year));
echo "<option value=\"bydate.php?date=$var\">$date</option>";
$mon = $mon - 1;
} while ($var > 06-2002);
Any help would be greatly appreciated.
Thank you.