![]() |
syntax error???
I have this code looking to check to make sure at least 1 checkbox is checked but i'm getting this error and not understanding where the error is.. help?
PHP Code:
Code:
Parse error: syntax error, unexpected T_IS_EQUAL, expecting ')' |
Try...
Code:
If ( empty(($up == 2) && ($app == 2) && ($dep == 2) && ($sold == 2)) ) {you need to change the && to || One is and, the "||" means or .. Also as I have done in my example, each part needs to be evaluated, so you need to have each test bracketed.. Code:
<?php |
This is the error i get with that code.
Code:
Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '$' |
Now try the code with one of the vars
Code:
$up = 2; |
Now if you "invert" the selection using the logical NOT symbol !
Code:
<?php |
This did it! Thanks!
Quote:
|
| All times are GMT. The time now is 01:46 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0