Esempio n. 1
0
    }
    if (!$errorManager->hasErrors()) {
        $userLogin->startSession($_POST['username']);
        header('Location: account.php');
        exit;
    }
}
require_once 'header.php';
?>

    <form action="index.php" method="POST">
        <div>
            <label>Username:</label> <input type="text" name="username" value="" placeholder="Enter Username">

            <span class="error"><?php 
echo $errorManager->getError('username');
?>
</span>
        </div>

        <div>
            <label>Password:</label> <input type="password" name="password" value="" placeholder="Enter Password">

            <span class="error"><?php 
echo $errorManager->getError('password');
?>
</span>
        </div>

        <button>Login</button>
    </form>