View sourcecode

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

hemsida.php

28 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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="bulma.css">
    <title>Hemsida</title>
</head>
<body>
    <header class="title navbar has-shadow is-justify-content-center has-background-primary">Inloggningsapplikation</header>
    <div class="m-3">
        
    <?php
    session_start
();
    if(isset(
$_COOKIE['Användarnamn'])){
        echo 
"Du är inloggad som: " $_COOKIE['Användarnamn'];
    } else{
        echo 
"Du är inloggad som: " $_SESSION['Användarnamn'];
    }
    
?>


        <form action="logout.php" method="post">
            <input class="mt-2" type="submit" name="Logout" value="Logga ut"></input>
        </form>
    </div>
</body>
</html>