l203/index.php

<?php include('db.php'); //Verbinding maken met database //Controleren of wachtwoord en gebruikersnaam zijn ingevuld en juist if(isset($_POST['wachtwoord']) && $_POST['wachtwoord'] === 'Grimme' && isset($_POST['gebruikersnaam']) && $_POST['gebruikersnaam'] === 'Grimme'){ $wachtwoord = mysqli_real_escape_string($db, $_POST['wachtwoord']); $gebruikersnaam = mysqli_real_escape_string($db, $_POST['gebruikersnaam']); //Doorsturen naar starts header("Location: start.php"); exit(); } ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Index</title> <link rel="stylesheet" href="style/style.css"> </head> <body> <!-- Weergeven--> <div class="inlog"> <h1>De Dierentuin Website</h1> <h3>Inloggen</h3> </div> <div class="start"> <!-- Gebruikersnaam en wachtwoord vragen--> <form action="index.php" method="POST" id="searchForm"> <label>Gebruikersnaam:</label> <input type="text" name="gebruikersnaam" id="searchBox" placeholder="Grimme" required> <br></br> <label>Wachtwoord:</label> <input type="password" name="wachtwoord" id="searchBox" placeholder="Grimme" required> <br></br> <input type="submit" name="Zoekenn"> </form> </div> <div class="basis1"> </div> </body> </html>

Resultaat

Made by Thijs Aarnoudse