I’m trying to basically use if statement that says
if ($_POST['mc_gross_1'] != '20' || $_POST['mc_gross_1'] != '19')
which if it’s not equal to 19 or 20 I give an error but it’s not working. What am I doing wrong?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use
&&or AND, not||or OR. OR is checking both values. A variable cannot be equal to two different numbers at the same time.