View sourcecode

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

index.php

46 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
44
45
46
<?php 
$mess
="";

if(isset(
$_GET['mess'])){
    
$mess= "<p class='text-error'>{$_GET['mess']}</p>"; //Kan skriva ut felmedelanden med ?mess
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Inloggsaplikation</title>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">

<!-- CSS Reset -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css">

<!-- Milligram CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.css">

</head>
<body>

    <header><h1>Inloggningsformulär</h1> </header>

    <?php echo $mess; ?>

    <form action="login.php" method="post">
        <label for="username">Användarnamn:</label>
        <input type="text" id="username" name="username" required><br>

        <label for="password">Lösenord:</label>
        <input type="password" name="password" required><br>

        <p><input type="checkbox" name="keeplogedin">Håll mig inloggad</p>

        <input type="submit" value="logga in">
        <p><a href='signup.php'>skapa konto</a></p>
        <p><a href='errase_anvandare.php'>radera konto</a></p>

    </form>

</body>
</html>