Jump to content

[SOLVED] Not Equal (okay)... a "not in" operator?


pmg206

Recommended Posts

I'm trying to write around a unique qualifier on a PHP 4.0.x web page login screen.  Currently, each of a few logins direct folks to a specific page unique to them.  Worked fine until the company started to grow, and the intent is to allow roles of folks (users, managers, admins) to all view the same single page, but maintaining their individual logins (so sharing a login to accomplish landing on the same page isn't an option).

 

The thought was to change the != Joe in the existing code (below) to something like a != (Joe,Tom,Jack), but the correct operator for a "not in list" has been elusive in the PHP documentation (can't imagine why searching for "in" operator brings back hundreds of responses, y'know, since "in" is such an uncommon term).

 

We did try setting up groups (1, 2, 3, etc.) in the access table, but it seems the login tool keys off of the username as the access control piece. 

 

So the question is if (a) such a thing is practical to do a not-in-list sort of thing, or if not (b) if there's a different login tool out there one can suggest, and I'll push The Power That Be that change is for the better.  Thanks!

 

 

 

// Determine user page view
if(!isset($HTTP_COOKIE_VARS['our_yummy_cookie'])){
  header("Location: login_or_leave.php");
} else {
  if($HTTP_COOKIE_VARS['our_yummy_cookie'] != Tony){
    header("Location: dashboard2.php");
  }
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.