lundi 16 mars 2015

PHP IF construct when dealing with a part that is an exception

I'm having some trouble getting my code to work. And I kinda lost my overview. Who can give me some insight?


I'm looking for how to build an IF construct. If I would describe it in words:



MismatchBundle = true unless (adminPass = true & user = admin)



I wrote the following code, but this didn't seem to work:



if (($MismatchBundle == true) && ($adminPass != true && $thisUser['rankid'] != 1)


Anyone who knows how to get the 'unless' part in the code?




Edit: What about this?



if (($MismatchBundle == true) && !($adminPass == true && $thisUser['rankid'] == 1)


Is this allowed with the ! before a () section?


Aucun commentaire:

Enregistrer un commentaire