View sourcecode

The following files exists in this folder. Click to view.

index.php

43 lines UTF-8 Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?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>