tralasciando la parte con i link ecc. una pagina php base per l'accesso di un utente può essere così:
<?PHP
$user = "user";
$pass = "pass";
$username = $_POST["id"];
$password = $_POST["pw"];
if ($username == $user && $password == $pass) {
header('Location: riservato.html');
} else {
header('Location: index.html');
}
?>
<html>
<body>
<form name="form" action="login.php" method="POST">
<input type="text" name="id">
<input type="text" name="pw">
<input type="submit" name="bottone" value="bottone">
</form>
</body>
</html>