Jump to content

calendar type list/menu


corillo181

Recommended Posts

this is what i got so far, but i dont know how to turn the months  so that whne you pick a month the number of days for that month shows

 

<form action="" method="get">
  <label>month
  <select name="month" id="month">
<?
$jd=cal_to_jd(CAL_GREGORIAN,date("m"),date(1),date("Y"));
$monthname=jdmonthname($jd,1);
?>
    <option value="<?=$monthname?>"><?=$monthname?></option>
<?
?>
</select>
  </label>
  <label>days
  <select name="days" id="days">
    <option value="1" selected="selected">1</option>
<?
$thismonth=(int)date("m");
$thisyear=date("Y");
$numdaysinmonth=cal_days_in_month(CAL_GREGORIAN,$thismonth,$thisyear);
for($count=1;$count<=$numdaysinmonth;$count++){?>
<option value="<?=$count?>"><?=$count?></option>
<?
}
?>
  </select>
  </label>
</form>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.