I use the elses class, and this person defined a function with five arguments.
in Sentry.php:
function checkLogin($user = '',$pass = '',$group = 10,$goodRedirect = '',$badRedirect = '')
If all five fields are completed, this will lead to the login procedure.
Now on the page where he explains how to use this, there is a fragment that, according to php.net, does not make sense.
on the page that loads the sentinel:
require_once('../system/Sentry.php');
$theSentry = new Sentry();
if(!$theSentry->checkLogin(2)){ header("Location: login.php"); die(); }
which should behave by default so that it checks to see if the $ group argument is <= 10 (the default). In this situation, it should be two. If the user has a group variable <= 2 set, this should allow the person to view the page.
However, this does not work for a very obvious reason either: the php manual states:
, , ; .
, , phpbuilder.com, ($variable = default_something) , .
?:
checkLogin(2)