![]() |
![]() |
Easy Age Selection - PHPIf you are making your own website registration form, then on the of chance you want an age selection box then don't spend hours manually typing it in, just a 3 lines of PHP and it will automatically do it for you. Very simple! Below is the tiny bit of code that will automatically make a dropdown box for your site. Basically it starts at 1 and goes to 100. If you want to change the numbers then edit the $i = 1 value, which is the number it starts on, then edit the $i < 101 value, which is the number it goes upto plus one, so 54 would go upto 53. <select name="age"> <?php for($i=1;$i<101;$i++) { echo "<option>$i</option>"; } ?> </select> Comments:Post your comment... |
| Learn how to buy at trustee |
| Latest News Stories » Not good... » Internet Explorer 8 Problems » October » Relaxtion by Dale Hay » BBC Weather Revamp » Dog Singing |
Top Viewed Stories » PHP Mini Message Board Tutorial (4,211) » Rare McDonalds Monopoly 2008 Tickets (3,063) » PHP Search Engine Tutorial (2,271) » Helen Willetts Pregnant? (1,400) » QI Series 6 on BBC One (900) » Create your own Image Uploader (873) |
Most Commented Stories » PHP Mini Message Board Tutorial (33) » Create your own Image Uploader (18) » I like my DuMP (15) » I'm on Wikipedia! (7) » Chocie Munchin Niece (6) » Life on Mars... (6) |
![]() ![]() |