chard Posted September 7, 2007 Share Posted September 7, 2007 Hi guys, Not sure if this is the right syntax but I'm a bit lost. This is what i'm doing: if(!isset($a,$b,$c)) { //line 23 something } The error I'm getting is: Parse error: syntax error, unexpected '{' in /home/mytest/public_html/mtun.php on line 23 Quote Link to comment https://forums.phpfreaks.com/topic/68293-isset-help/ Share on other sites More sharing options...
teng84 Posted September 7, 2007 Share Posted September 7, 2007 if(!isset($b) ||!isset($c) ||!isset($a)){ // } Quote Link to comment https://forums.phpfreaks.com/topic/68293-isset-help/#findComment-343388 Share on other sites More sharing options...
teng84 Posted September 7, 2007 Share Posted September 7, 2007 oops you use $variables right? so i guess better to use empty if(!empty($b) ||!empty($c) ||!empty($a)){ // } i guess checking using isset is better for post , get , session , ect.. Quote Link to comment https://forums.phpfreaks.com/topic/68293-isset-help/#findComment-343389 Share on other sites More sharing options...
sneamia Posted September 7, 2007 Share Posted September 7, 2007 There shouldn't be an exclamation before empty. It should simply be if(empty($a) && empty($b) && empty($c)) { //line 23 something } But to decide whether it is && or ||, we need to know what you are trying to evaluate. Quote Link to comment https://forums.phpfreaks.com/topic/68293-isset-help/#findComment-343394 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.