i wanted to do a dynamic calendar where i could display a data from database from selected date. However i alredy stuck in here, not sure what should i do then..
i have my dropdown calendar here..
<form method="post" name="f1" action='tm.date.php';>
<table border="0" cellspacing="0" >
<tr><td align=left >
<?php
$day = array('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31',);
echo '<select name="days">';
for($d=0; $d<count($day)+1; $d++){
echo '<option value="'.$d.'">'.$day[$d].'</option>';
$days = mktime(0,0,0,date("d"),date("m"),date("Y"));
}
echo '<select />';
?>
</td><td align=left >
<?php
$month = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
echo '<select name="months">';
for ($i = 0; $i < count($month)+1; $i++){
echo '<option value="'.$i.'">'.$month[$i].'</option>';
$months = mktime(0,0,0,date("d"),date("m"),date("Y"));
}
echo '<select />';
?>
</td><td align=left >
<?php
$year = array('2006', '2007');
echo '<select name="year">';
for ($y = 0; $y < count($year)+1; $y++){
echo '<option value="'.$y.'">'.$year[$y].'</option>';
$years = mktime(0,0,0,date("d"),date("m"),date("Y"));
}
echo '<select />';
?>
</td><td align=left >
<input type=submit value=Submit>
</table>
</form>
can someone guide me what should i write in tm.date.php
i'm stuck in here..
thanks...