Example #1
0
<?php

require_once '../dbFunction.php';
$validateur = new User();
$validateur->validation($_GET['pseudo'], $_GET['cle']);
if ($validateur->validation($_GET['pseudo'], $_GET['cle']) === true) {
    if (true === $validateur->verifUser($_GET['pseudo'])) {
        header('location: do_profil.php?pseudo=' . urlencode($_GET['pseudo']) . '');
    }
}
            $this->rights[] = "clerk";
        }
        if ($this->setRight() & USER) {
            $this->rights[] = "regular user";
        }
        echo "<span class = 'logMsg'> As " . $this->userName . ", you have ";
        echo implode(" and ", $this->rights) . " level access.</span>";
    }
}
//Ends class User.
// check to make sure client is not just revisiting page as login user
if (isset($_SESSION)) {
    echo "Welcome back, " . $_SESSION['data'] . ".";
} else {
    $user = new User();
    if ($user->validation()) {
        $user->getRight();
    }
}
?>

<html>
<head>
      <title>Log-In Page</title>
      <style>
        fieldset {
            padding: 5px; 
            width: 50%;
            margin: auto;

        }