in reply to CGI POST vs. GET problem
Could you post the HTML? Checking out your form tag might help (I'm wondering offhand if you are using and enctype of "multipart/form-data" I think doesn't work with GET. I'll have to double check).
Your GET data should be in %ENV{ 'QUERY_STRING' }. Try printing that directly to the screen. If it doesn't have anything, then your GET data is not being sent. You could also check your server access logs as that will contain the query string if you use GET.
Other comments: You haven't used warnings, strict, or taint checking. Perhaps this is just a minimal test case you're showing us, but these issues are very important.
Final note: your regular expression could use some work. Right now, if someone types an extra forward slash, it will break. Assuming that you only have numbers for month, day, and year (with a four digit year), the following regex will work better:
my ( $month, $day, $year ) = ( $startdate =~ m%(\d\d)/(\d\d)/(\d\d\d\d +)% );
See Death to Dot Star! for details.
My apologies if this post seems like overkill!
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|