-- Original message --
From: Jeff Oien <[EMAIL PROTECTED]>
> //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
[snip]
> 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
On Tue, 02 Nov 2004 12:17:45 -0600, Jeff Oien <[EMAIL PROTECTED]> wrote:
> if ($Promotion_Sub == 'Checked' && ($code != 'D04E' || $code != 'Y04KG')) {
($code != 'D04E' || $code != 'Y04KG')
Since $code cannot equal two different values at once, this will
always evaluate to true. Maybe you meant &
3 matches
Mail list logo