|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
I have a form for updating an on-line calendar. On the form I am askign for the year of the event. What I would like to do is show the current year then the next three years in the drop down box. can I use the following code: (just echoing the year for the purpose of my question)
PHP Code:
so it would show 2003 2004 2005 2006
__________________
CHornJr "One day I'll know what I am doing" ![]() My Blog Suanhacky Lodge #49 Rebel Squadrons Last edited by CHornJr : June 10th, 2003 at 01:31 AM. |
|
#2
|
|||
|
|||
|
so what is the question?
![]()
__________________
-- Jason |
|
#3
|
|||
|
|||
|
I have just the code you need.
I created a class a while back that suited my needs perfectly. There are areas that could use some functionality, but for the most part it works well. http://www.laidbak.net/dateselect/
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#4
|
||||
|
||||
|
Quote:
Will "year++" work PHP Code:
|
|
#5
|
|||
|
|||
|
CHornJr,
Have you given it a try... No better way of knowing than testing it out! ![]() I think what Taelo was trying to say is that you may have answered your own question... ![]()
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
|
#6
|
||||
|
||||
|
It does work. What do oyu know. I guess I shoudl ahve tried it int he first palce. Well, now I know better. My next question won't be so stupid though
|
|
#7
|
|||
|
|||
|
Quote:
Hehehe... Don't feel so bad... We all make mistakes... but in the end, you solved your own! ![]() |
|
#8
|
|||
|
|||
|
they way I would do it would be like:
PHP Code:
all this does is loop for the current year, + 3. also just as a developer note, for is alot faster then while ![]() |
|
#9
|
|||
|
|||
|
Quote:
Hehehe... That's a lot easier... I'm with Ben on this one!! LOL |
|
#10
|
|||
|
|||
![]() |
|
#11
|
|||
|
|||
|
:P
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Question with Getdate() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|