Error Code Airhead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux