l101/project/inlogx.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="style.css?t <?php echo time();?>">
<?php
if(isset($_POST['username']) && isset($_POST['password'])){
$username = $_POST['username'];
$password = $_POST['password'];
}
?>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form method='post' action ='' class='inlog'>
<div>Naam <input type='text' name='username' value="" class='inlog_knoppen'></div>
<div>Wachtwoord <input type='password' name='password' value="" class='inlog_knoppen'></div>
<div><input type='submit' value='Aanmelden' class='inlog_knoppen'></div>
</form>
<?php
include('menubalkx.php');
include('db.php');
include('function.php');
if(isset($_POST['username']) && isset($_POST['password'])){
if($username == "Grimme" && $password == "Grimme"){
echo "<div class='inlog'>je bent ingelogd</div>";
setcookie('admin', true, time() +60*60*24);
}
else{
echo "<div class='inlog'>De inloggegevens zijn onjuis</div>";
}
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse