Hi,
i have some code that allows the using to input the date.
how do i join the day, month and year so it can be reversed into MySQL date format?
is this the easiest way to create a date drop down?
Code:
<tr>
<td>Shift Date</td>
<td><div align="left">
<?php
$months = range(1,12);
$days = range (1, 31);
$years = range (2005, 2006);
echo '<select name="day">';
foreach ($days as $value) {
echo "<option value=\"$value\"> $value</option>\n";
}
echo '</select>';
echo '<select name="month">';
foreach ($months as $key => $value1) {
echo "<option value=\"$key\"> $value1</option>\n";
}
echo '</select>';
echo '<select name="year">';
foreach ($years as $value2) {
echo "<option value=\"$value2\"> $value2</option>\n";
}
echo '</select>'
?>
</div></td>
</tr>
Thanks in Advance!!
i have some code that allows the using to input the date.
how do i join the day, month and year so it can be reversed into MySQL date format?
is this the easiest way to create a date drop down?
Code:
<tr>
<td>Shift Date</td>
<td><div align="left">
<?php
$months = range(1,12);
$days = range (1, 31);
$years = range (2005, 2006);
echo '<select name="day">';
foreach ($days as $value) {
echo "<option value=\"$value\"> $value</option>\n";
}
echo '</select>';
echo '<select name="month">';
foreach ($months as $key => $value1) {
echo "<option value=\"$key\"> $value1</option>\n";
}
echo '</select>';
echo '<select name="year">';
foreach ($years as $value2) {
echo "<option value=\"$value2\"> $value2</option>\n";
}
echo '</select>'
?>
</div></td>
</tr>
Thanks in Advance!!