i am currently creating an application. I have created a form where the user is able to choose a year,month,day,hour and minute. I was wondering how to insert this into my sql database. Thanks
code for the form-
<select name="day" id="day">
<?php
for($i=1;$i<=31;$i++)
{
echo "<option>" . $i . "</option>";
}
?>
</select>
<td>
<select name="month" id="month">
<?php
for($i=1;$i<=12;$i++)
{
echo "<option>" . $i . "</option>";
}
?>
</select>
<td>
<select name="year" id="year">
<?php
for($i=2015;$i<=2016;$i++)
{
echo "<option>" . $i . "</option>";
}
?>
<td>
</select>
<select name="Hour" id="hour">
<?php
for($i=0;$i<=23;$i++)
{
echo "<option>" . sprintf("%02d",$i) . "</option>";
}
?>
</select>
<td>
<select name="minute">
<?php
for($i=0;$i<=60;$i++)
{
echo "<option>" . sprintf("%02d",$i) . "</option>";
}
?>
</select>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…