diff options
Diffstat (limited to 'signin.php')
-rw-r--r-- | signin.php | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -1,20 +1,20 @@ <?php session_start() ?> <!DOCTYPE html> <html lang="en"> -<head> - <title>Sign in - cflip.net forum</title> - <link rel="stylesheet" href="styles/style.css"> -</head> -<body> + <head> + <title>Sign in - cflip.net forum</title> + <link rel="stylesheet" href="styles/style.css"> + </head> + <body> <?php include_once './includes/templates/header.php' ?> -<h2>Sign in</h2> -<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> - <label for="user_name">Username: </label><br> - <input type="text" name="user_name"><br> - <label for="user_pass">Password: </label><br> - <input type="password" name="user_pass"><br> - <input type="submit" name="submit"> -</form> + <h2>Sign in</h2> + <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post"> + <label for="user_name">Username: </label><br> + <input type="text" name="user_name"><br> + <label for="user_pass">Password: </label><br> + <input type="password" name="user_pass"><br> + <input type="submit" name="submit"> + </form> <?php include_once 'includes/error.php'; @@ -58,12 +58,12 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (!password_verify($user_pass, $user->password)) { echo 'Password does not match!'; } else { - Session::get()->sign_in($user); + Session::get()->sign_in($user); header("Location: index.php"); } } } } ?> -</body> + </body> </html> |