Gossamer Forum
Home : General : Perl Programming :

What's wrong with this sub?

Quote Reply
What's wrong with this sub?
I am trying to get the input from the from (hidden) and then checking to see if it is an affiliate and if so print the name of the affiliate by calling the "sub affiliatehead"

What's wrong?

sub Validate {
if ($FORM{'affiliate'} eq "") {
$found_not = 1;
}

if ($found_not == 1) {
&Header;
&Content;
&Footer;
exit;
}

elsif ($found_not != 1) {
&AffiliateHead;
&Header;
&Content;
&AffiliateFoot;
exit;
}

}

Thanks
Quote Reply
Re: What's wrong with this sub? In reply to
Hi Socrates. Try this:
Code:
sub Validate {
if (($FORM{'affiliate'}) {
&AffiliateHead;
&Header;
&Content;
&Footer;
exit;
}

else {
&Header;
&Content;
&Footer;
exit;
}
}




------------------
Rogerio Morais
www.rogerle.com


[This message has been edited by Roger (edited June 12, 1999).]
Quote Reply
Re: What's wrong with this sub? In reply to
Thanks Roger, I will try.