View sourcecode

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

login.php

15 lines UTF-8 Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
session_start
();
if (isset(
$_SESSION["auktoriserad"]) && $_SESSION["auktoriserad"]) {
    
header("location: admin.php");
    exit();
}

if (
$_POST["användarnamn"] == "Oliver" && $_POST["lösenord"] == "Majskolv") {
    
$_SESSION["användarnamn"] = $_POST["användarnamn"];
    
$_SESSION["auktoriserad"] = true;
    
header("location: admin.php");
} else {
    echo 
"fel";
}
?>