Find the answer to your Linux question:
Results 1 to 2 of 2
hello can any one tell ma how to make Date of Birth form in html....in short codes.....? thanks ashi...
  1. #1
    Just Joined!
    Join Date
    Mar 2011
    Posts
    1

    html form

    hello can any one tell ma how to make Date of Birth form in html....in short codes.....?
    thanks
    ashi

  2. #2
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    241
    Hi,
    Well it depends on the fields you wanna use.

    Since html is only the format as it is shown you could add following:
    HTML Code:
    <select name="Year">
    <option>1960</option>
    <option selected>1961</option>
    ...
    <option>2011</option>
    </select>
    well if you can use a script it may look like
    PHP Code:
    <select name="Year">
    <?php
    $i
    =1960;
    $now=date("Y");
    while (
    $i $now) {
    echo 
    "<option";
    if (
    $i == $selected_year) echo " selected";
    echo 
    ">$i</option>";
    $i++;
    }
    ?>
    </select>
    The same goes for the month and day.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...