Well, what exactly is the value of $av_equip and $date_slide at this
time? Add a few print statments in for debugging, use CGI::dump() to
see what is really being passed in. You may not be storing the values
you expect in these variables.
Cheers,
Kevin
On Wed, Aug 14, 2002 at 09:28:22AM -0700, Pam Derks ([EMAIL PROTECTED]) said
something similar to:
> Hi Kevin,
>
> I've changed per your suggestion to:
>
> elsif ($av_equip eq "slide") {
> if ($date_slide eq "") {
> print $q -> h3(), "Please enter date needed for 35mm Slide Projector.";
> }
> }
>
>
> but the error checking isn't working,
> i.e. if I've got 35mm checked, the error message isn't being displayed
>
> any other ideas?
>
> thanks, Pam
>
> >>> Kevin Meltzer <[EMAIL PROTECTED]> 08/14/02 09:17AM >>>
> Hi Pam,
>
> On Wed, Aug 14, 2002 at 08:37:46AM -0700, Pam Derks ([EMAIL PROTECTED]) said
>something similar to:
> [snip]
>
> > elsif ($av_equip eq "slide" || "tvvcr" || "lcd" || "boombox" || "overhead" ||
>"opaque" || "flipchart" || "projection") {
>
> This is basically like saying:
>
> elsif ($foo eq "bar" || 1 || 1 || 1 || 1) {
>
> or
>
> elsif (1) {
>
> You would want to change this so each part is '$av_eqip eq "whatever"',
> or '$av_equip =~ /^(foo|bar|baz|etc)$/'
>
> Also, you do not show how you are defining the variables you are
> checking. You are using param(), correct?
>
> Do a 'print $q->dump()', and make sure you are getting the parameters
> correct.
>
> > snippet of cgi code is:
> > $tempfile = "/tmp/avtemp$$.txt";
> >
> > $send_to = $q -> param('send_to');
> >
> > # E-mail answers:
> >
> > $date = localtime();
> > if (open(MAIL, ">$tempfile")) {
> > print MAIL <<EOF;
> > To: $send_to
> > From: $send_to
> > Subject: AV Request Form
>
> Please look at one of the Mail::* modules, or MIME::Lite for sending
> email.
>
> Cheers,
> Kevin
>
> --
> [Writing CGI Applications with Perl - http://perlcgi-book.com]
> Nuclear explosions under the Nevada desert? What the f*ck are we testing for?
> We already know the sh*t blows up.
> -- Frank Zappa
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
[Writing CGI Applications with Perl - http://perlcgi-book.com]
Don't mind your make-up, you'd better make your mind up.
-- Frank Zappa
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]