Jump to content

display day, month, year


Ameslee

Recommended Posts

I cant work out why there is a problem with the following code

[code]
<td>Date
<td>

<select name="month">
<option value="$month">$newmonth</option>
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>

</select>

<select name="day">
<option value="$day">$day</option>
events;

$x=1;
while($x<=31){
echo "<option value=$x>$x</option>";
$x++;
}
echo "</select>";

echo "<select name='year'>";
echo "<option value=$year>$year</option>";
$y=2007;
while($y<=2020){
echo "<option value=$y>$y</option>";
$y++;
}[/code]

i was just updating a site and i changed the $y=2007, coz it was 2006 and now when it displays theres two 2007's, why?

plz help thanks
Link to comment
https://forums.phpfreaks.com/topic/34349-display-day-month-year/
Share on other sites

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.