09-26-2007, 10:07 PM
|
#2 (permalink)
|
|
The Frequenter
Join Date: Sep 2007
Posts: 360
Thanks: 24
|
I researched on php range(); function and learned how to do it.
PHP Code:
<p>
Start Date:
<select name="startDateYear">
<option selected="selected" disabled="disabled">Year</option>
<?php
foreach(range(date('Y'), date('Y')+10) as $iYears){
echo '<option>'.$iYears.'</option>';
}
?>
</select>
<select name="startDateMonth">
<option selected="selected" disabled="disabled">Month</option>
<?php
foreach(range(1, 12) as $iMonths){
echo '<option>'.$iMonths.'</option>';
}
?>
</select>
<select name="startDateDay">
<option selected="selected" disabled="disabled">Day</option>
<?php
foreach(range(1, 31) as $iDays){
echo '<option>'.$iDays.'</option>';
}
?>
</select>
</p>
|
|
|
|