You need parentheses around the entire antecedent: if (($type !="add") || ($type !="edit") || ($type !="delete")) { //etc
^------- Note these parentheses---------------------------^ Hope that helps. At 05:28 PM 12/4/2001, Dan McCullough wrote: >Question. I am trying to check to see if a certain piece of code should >be run. Here is an >example. >if ($type != "add") || ($type != "edit") || ($type != "delete") {//if this >or this or this then >then run this code >} else { >then run this >} > >Is this correct, for some reason this isn't working. Sliante, Richard S. Crawford http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford MSN: [EMAIL PROTECTED] "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]