On Mon, 14 Jul 2003 12:04:54 +0200, you wrote: > if ($user!='monganl') is what I have > >this is what I want to do > if ($user!='monganl' or 'wilsonma') > >what would be the proper format for this!
if ($user != 'monganl' || $user != 'wilsonma') however, this condition would never fire, as $user is /always/ not 'monganl' or not 'wilsonma' - it can't be both at the same time. In this context I think you actually want 'and', not 'or'. The boolean 'and' and 'or' are a little more strict than their English equivalents. That would give us: if ($user != 'monganl' && $user != 'wilsonma') Also, at the moment, "wilsonma" wouldn't match "WilsonMA". Maybe you want to convert your username to lower-case before testing it? if (strtolower($user) != 'monganl' && strtolower($user) != 'wilsonma') or $user = strtolower($user); if ($user != 'monganl' && $user != 'wilsonma') -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php