View Poll Results: Rate this script on 1 to 5 bases, 1 being lowest, 5 being highest.

Voters
5. You may not vote on this poll
  • 1

    0 0%
  • 2

    0 0%
  • 3

    0 0%
  • 4

    1 20.00%
  • 5

    4 80.00%
+ Reply to Thread
Results 1 to 6 of 6

Thread: How to create a current year to 1900 select box.

  1. #1
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    How to create a current year to 1900 select box.

    Well it will create a current year to 1900 select box.

    Demo: http://development.brandonsgames.com/2007box.php

    Use the code

    PHP Code:
    <select name="year">
    <?php 

    /* 
    Current Year to 1900 box generator
    Brandon Long <brandon@x10hosting.com> 
    Demo: http://development.brandonsgames.com/2007box.php
    */

    // Auto-updates to current year, can be changed to any year.
    $year date("Y");

    while (
    $year 1899) {  
    echo 
    '<option value="'.$year.'">'.$year.'</option>
    '
    ;
    $year $year '1';
    }

    ?>
    </select>
    So the box right now would be 2006 to 1900, it can be updated to go the other way easily. Post here any questions or e-mail me.
    Thanks,
    Brandon Long

  2. #2
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    Re: How to create a current year to 1900 select box.

    i'd give it a 5, btw, thanks for helping me with KleenAS hahah
    -Chris Z
    Retired Account Manager


  3. #3
    YamiKaitou's Avatar
    YamiKaitou is offline x10 Elder YamiKaitou is an unknown quantity at this point
    Join Date
    Oct 2006
    Posts
    636

    Re: How to create a current year to 1900 select box.

    Nice, beats having to type all of them. 5

  4. #4
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    Re: How to create a current year to 1900 select box.

    another thing though, could you do the same for the months and dates , that would be appreciated too :P
    -Chris Z
    Retired Account Manager


  5. #5
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: How to create a current year to 1900 select box.

    Later today, its 2 am damit....:nuts:

    Think I code all night.
    Thanks,
    Brandon Long

  6. #6
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    Re: How to create a current year to 1900 select box.

    lol sometimes...haha i'm sick of coding, i think i'm done for the night..
    -Chris Z
    Retired Account Manager


+ Reply to Thread

Similar Threads

  1. x10's 1 Year Anniversary!
    By Corey in forum News and Announcements
    Replies: 60
    Last Post: 12-28-2005, 10:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers