I am trying create login web page.This is the code written to display drop down list for date of birth.But I am not getting day and year in the drop down list.If i write all the 31 days then I will get days.But it is not working for for loop in php. Please guide me in this.
<select class="biginput" name ="day">
<option> Day </option>
<?php for($i=1;$i<=31;$i++)
{
echo "<option value=$i>$i</option>";
}
?>
</select>
<select class="biginput" name="year">
<option>Year</option>
<?php for($i=date("Y");$i>=date("Y")-90;$i--)
echo"<option value=$i>$i</option>";
?>
</select>
Output: I am getting only blank list instead of days and year.
Aucun commentaire:
Enregistrer un commentaire