Do you have a question? Post it now! No Registration Necessary. Now with pictures!
January 30, 2006, 3:37 am
rate this thread
Re: Help with forms.
You generally shouldn't require the user to enter such bizarre date
formats into a form, you should make it a little more user friendly by
either providing 3 separate fields for day, month and year (as long as
you make it clear which field is which) or using something sensible like
ISO-8601 (e.g. 2006-01-30).
As for redirecting the user, that's a server side issue that can be
easily handled by your form processing script (e.g. PHP, ASP, JSP, Perl,
Python or whatever you like).
Markup: (minimal example only, some markup omitted for brevity)
<form method="get" action="/article">
<p>Year (4 digits): <input type="text" name="year">
<p>Day (1-2 digits): <input type="text" name="day">
When submitted, the server side script will receive values for the year,
month and day, which can then be used to construct the correct file
name, check if one exists for that date and if it does send a 303 See
Other HTTP response with a location header field to redirect the user.
Writing the server side script is off-topic for this newsgroup.
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox