Date in Input Form

Discussion in 'PHP' started by piropeator, Oct 11, 2008.

  1. #1
    How do I make a input code for a date in a form? (see picture)

    My script process is in PHP, but the input form in HTML.


    [​IMG]

    thanks.
     
    piropeator, Oct 11, 2008 IP
  2. skolor

    skolor Peon

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If all you are looking for is a way for a user to input a date, just do:

    <form action="">
    <select name="Day">
    <? php
    for($i=1;$i<31;$i++) {
    echo "<option value=\"".$i."\">".$i."</option>";
    }
    ?>
    </select>
    </form>
    Code (markup):
    And then repeat that for each input.
     
    skolor, Oct 11, 2008 IP