Gidday All,

I would like to write this if statement better by combining the two
elsif conditions.

if( !&check_url ){
  print '<p class="bodytext">The Referrer
<b>'.$ENV{'HTTP_REFERER'}.'</b> is not allowed to access this
cgi-script!</p>';
}
elsif( !&check_email( $data{'toAddress'} ) ){
  print '<p class="bodytext">An email cannot be sent ' .
$data{'toAddress'} .' is not a valid email address.</p>';
}
elsif( !&check_emailDomain( $data{'toAddress'} ) ){
  print '<p class="bodytext">An email cannot be sent ' .
$data{'toAddress'} .' is not a valid email address.</p>';
}
else{

}

I tried this with no success

if( !&check_url ){
  print '<p class="bodytext">The Referrer
<b>'.$ENV{'HTTP_REFERER'}.'</b> is not allowed to access this
cgi-script!</p>';
}
elsif( !&check_email( $data{'toAddress'} ) && !&check_emailDomain(
$data{'toAddress'} )  ){
  print '<p class="bodytext">An email cannot be sent ' .
$data{'toAddress'} .' is not a valid email address.</p>';
}
else{

}

Thanking you in anticipation

Colin Johnstone
**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to