How To Make Date Form With PHP

If you want to know about how to make date form with java, i'll give you an example and you can try with your self.. The first, you must have a XAMPP than installed on your pc, and then you must activate your xampp server (Apache and Mysql) as usual.

Date Form
You should activate your xampp. It must "running"

 Here is the code :

<form action="yourphp" method="POST">
<select id="day" name="day">
<?
$i=0;
for ($i=1;$i<=30;$i++) {
echo '<option>';
printf("%02d",$i);
echo'</option>';
}
?> </select>
<select id="month" name="month">';
<?
$name = array("january","February","Maret","April","Mei","June","July","August","September","October","November","December");
$i = 0;
while($i<12)
{
echo " <option value=".$name[$i].">".$name[$i]."</option>";
$i++;
?>
</select>
<select id="year" name="year">';
<?
for ($i=1990;$i<=2020;$i++) {
echo '<option>'.$i.'</option>';
}
?>
</select>
</form>

Save that blue code with name extention (.php). 

Access your file location with your web browser from localhost

It will display form like this : 

Date Form
That's all about how to make date form with php. Hope you understand about my explanation to you. Thank You.
How To Make Date Form With PHP How To Make Date Form With PHP Reviewed by Anonymous J on 22:22:00 Rating: 5
Powered by Blogger.