php if statement ignores condition -
i'm trying check if user countries , not ip address, enter if following statement checks $country
ignors ip check condition
if($country == "usa" || $country == "can" && $ipc != "1x.1x.1x.1x" && $ipc != "2x.2x.2x.2x"){
if(($country == "usa" || $country == "can") && $ipc != "1x.1x.1x.1x" && $ipc != "2x.2x.2x.2x")
you want use ( )
around ||
condition php evaluates correctly
this in math, use of order of operations.
Comments
Post a Comment