The following files exists in this folder. Click to view.
index.php43 lines UTF-8 Unix (LF)
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Logga in</title>
</head>
<body>
<h2>Inloggningsformulär</h2>
<?php
if (isset($_GET['mess'])) {
echo "<p style='color:red'>" . $_GET['mess'] . "</p>";
}
?>
<form action="login.php" method="post">
<label>Användarnamn:</label><br>
<input type="text" name="user"
value="<?php echo isset($_COOKIE['savedUser']) ? $_COOKIE['savedUser'] : ''; ?>">
<br><br>
<label>Lösenord:</label><br>
<input type="password" name="pass"><br><br>
<label>
<input type="checkbox" name="remember">
Kom ihåg mig
</label>
<br><br>
<input type="submit" value="Logga in">
</form>
</body>
</html>