Skip to content

Instantly share code, notes, and snippets.

@trietptm
Created January 6, 2013 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trietptm/4468160 to your computer and use it in GitHub Desktop.
Save trietptm/4468160 to your computer and use it in GitHub Desktop.
<?php
//Note: PHP < 4.2.0 only
$user = $_POST['user'];
$pass = $_POST['pass'];
if ($user->login($user, $pass)) {
$loggedIn = true;
if ($user->isAdmin()) {
$priv = 1;
}
}
// ...
if (!$loggedIn) {
include("login.php");
} else if ($priv > 0) {
include("admin.php");
} else {
include("intro.php");
}
?>
@evandrix
Copy link

evandrix commented Jan 7, 2013

register_globals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment