-------------- Original message ---------------------- From: Jeff Oien <jeff@xxxxxxxxxxxxxxx> > //always gives error message even if one of the two codes entered: > if ($Promotion_Sub == 'Checked' && ($code != 'D04E' || $code != 'Y04KG')) { If $code is D04K then it is not Y04KG making the statement true since it is an or. I think either ($code != 'D04E' && $code != 'Y04KG') or !($code == 'D04E' || $code == 'Y04KG') are what you are looking for. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php