NYCPHP Meetup

NYPHP.org

[nycphp-talk] I need a date...sorta...

leam at reuel.net leam at reuel.net
Tue Nov 30 06:45:37 EST 2004


Trying to drink less coffee in the morning, not sure it's wise to post.  :)

I'm trying to write an entry form that lets people enter future dates for an event. Most events are 1-4 days in length, which means they may start in one month and end in another. This form will submit to a MySQL databse, and another page will pull out the event information with start and end dates.

So if I'm going to have an event on 15 January 2005, and my event will last 4 days, the web page that shows my event will say:

	leam's Event, 15-18 Jan 2005

Of course, if my events begins on 30 Jan and goes for 4 days, it should put 31 Jan-2Feb 2005. I think I can make the Month and Year check itself and not print if they're the same. What I don't yet know is the best way to let a user input the date. The first thought that comes to mind is an html selection for each thing, "day" with 31 options, "month" with 12, etc. Ideally the form will be used outside the US so the whole issue of how to spell months and what order things go in has already cropped up. I don't have any translators so everything will be in english. 

Any suggestions?

ciao!

leam

p.s. For once I'm not in a rush. I've set no promised date for this so I have time to think it through. If there's a function or web page I should read, point me to it!




More information about the talk mailing list