Hi all,
I am having a problem i have it working great for current month but i was wanting to know if the current month is selected is fine but when i want to select next month eg June it shows same date this is what i have atmm
<table align="center">
<tr>
<th colspan="3">Event Date</th>
</tr>
<tr>
<th><select name="Day">
<?php
$day = date('d');
$days_in_month = date('t', strtotime($year . '-' . $month . '-1'));
for($i=$day;$i<=$days_in_month; $i++)
{
echo '<option value="'.$i.'">'.$i.'</option>';
}?>
</select>
</th>
<th><select name="Month">
<?php
$month = date('n');
//$months_in_year = date('t', strtotime($month . '-' . $day . '-1'));
for($i=$month;$i<=12; $i++)
{
$month_of_year = date($i);
echo '<option value="'.$i.'">';
if($i == 1)
{
echo 'Jan';
}
else if($i == 2)
{
echo 'Feb';
}
else if($i == 3)
{
echo 'March';
}
else if($i == 4)
{
echo 'April';
}
else if($i == 5)
{
echo 'May';
}
else if($i == 6)
{
echo 'June';
}
else if($i == 7)
{
echo 'July';
}
else if($i == 8)
{
echo 'Aug';
}
else if($i == 9)
{
echo 'Sept';
}
else if($i == 10)
{
echo 'Oct';
}
else if($i == 11)
{
echo 'Nov';
}
else if($i == 12)
{
echo 'Dec';
}
echo '</option>';
}?>
</select>
</th>
<th></th>
</tr>
<tr>
<th colspan="3"><input type="button" name="snd" value="Book Event" /></th>
</tr>
</table>
What am i doing wrong as for next month it shud show dates before today in next month if today was selected in next month shud see 22,21,20,19,18 etc… all the way back to first month of that month
But what am i doing im doing somthing abit simular to
https://www.airpacific.com/
For their section on left handside there.
Thanks,William