On Mon, Apr 22, 2002 at 11:02:54AM -0700, justin cunningham wrote:
> Hello, I'm trying to get this script to do error checking but it prints
> the error page every time regardless if there is or isn't input data.
> It works ok without the if statement but I wanted it to do the
> errorchecking. I s
Oops.. should be: (first line changed)
if(!defined($name) || $name eq "") {
# in this case, we redirect them to an error if the name is
# undefined or it is equal to "" (blank)
print $q->redirect(-location=>$ERR);
} else {
print $q->redirect(-location=>$OUTPAGE);
}
--
To UNSUBSCRIBE,
Hi Justin,
I'm having a hard time understanding your script. What's the deal with
'Q' and import_data ?
__BEGIN_REWRITE__
#!/usr/bin/perl -w
use strict; # helps ; must declare varibles
use CGI;
use CGI::Carp qw/fatalsToBrowser/;
my $OUTPAGE = '/thankyou.html';
my $ERR = '/error.html';
my $DATA
3 matches
Mail list logo