in reply to Re: Re: problem with variable
in thread problem with variable

Short answer: Your problem is here:
# Read in all the variables set by the form CGI::ReadParse(*input); $month = $input{'month'}; $date = $input{'date'}; $year = $input{'year'};
I don't know why not, but ReadParse is not working as you want it to in this instance. As a result $input{month} is undefined and so $month is too.

Since you're using CGI, and you know how to pull parameters out, I'd suggest you replace this block of code with something more like:

my $month = $q->param('month'); my $date = $q->param('date'); my $year = $q->param('year'); my $title = $q->param('title'); my $message = $q->param('message');
This will fix the problem you've described (and make you aware of a lot more).

Long answer

Further comments about your code are below. Some are good, some are nitpicky.

Hope this helps.

jarich