123456/V5 PO PHP/Pascal en Merlijn/inlog.php
<!DOCTYPE html>
<html lang="en">
<head>
<style>
</style>
<link rel="stylesheet" href="style.css?t=<?php echo time() ?>">
<?php include ('functions.php');
include ('db.php');
include ('menu.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
if(isset($_POST['username']) && isset($_POST['password'])){
if($username == "grimme" && $password == "grimme"){
echo "<div class='inlog'>Successvol ingelogd</div>";
setcookie('rechten', true, time() +60*60*24);
}
else{
echo "<div>Verkeerd wachtwoord of gebruikersnaam</div>";
}
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse