Error Code Airhead

From: Date: Tue, 02 Nov 2004 18:17:45 +0000
Subject: Error Code Airhead
Groups: php.general 
Request: Send a blank email to php-general+get-200944@lists.php.net to get a copy of this message
I'm sure I'm missing something really obvious here but can't see it. There is a form where one of two promotional codes can be entered. I check for the these codes and give the user an error message if they enter the wrong code. First one doesn't work, second one does with only one code. //always gives error message even if one of the two codes entered: if ($Promotion_Sub == 'Checked' && ($code != 'D04E' || $code != 'Y04KG')) { echo " <html> <head> <title>Error</title> </head> <body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000ff\" vlink=\"#660099\"> <h3>Error</h3> <p>Sorry, that code is invalid.</p> ----------------- //works: if ($Promotion_Sub == 'Checked' && $code != 'D04E') { Thanks Jeff

« previous php.general (#200944) next »