-2

I have a function that checks user permissions and I want it to do this:

if(verify("O") || ("M"))

so that it checks if the user has the permission "O" or "M" but it does not work

  • As well as looking at the duplicate question you should also at least check for obvious errors before posting: http://stackoverflow.com/questions/6575482/how-do-i-enable-error-reporting-in-php – Joe May 17 '14 at 15:21
  • @Joe This actually isn't a duplicate, contrary to popular belief – user3534341 May 17 '14 at 16:26

1 Answers1

1

You're close. This should work:

if(verify("O") || verify("M"))

If your function verify() only accepts one input. You need to call it again with the second input. Now, if either verify("O") or verify("M") returns true, your IF statement will return true.

Viktor Svensson
  • 755
  • 3
  • 17