l105/PO Informatica P4/solliciteren.php

<?php $voornaam = $_POST['voornaam']; $achternaam = $_POST['achternaam']; $leeftijd = $_POST['leeftijd']; $email = $_POST['email']; $submit = $_POST['submit']; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Solliciteren</title> <link href="style.css?t=<?php echo time();?>(>)" rel= "stylesheet" type=text/css> <style> .gegevens{ display: inline-block; width: 120px; } .logo { width: 200px; height: 70px; } .logoomhulsel { text-align: center; } </style> </head> <body> <div class="logoomhulsel"> <img class="logo" src="images\Jumbo_Logo.svg.png" alt=""> </div> <div class="navbarjumbo"> <a id="homeknop" href="Jumbo.php">Jumbo</a> <a href="jumboProducten.php">Bestellen</a> <a href="solliciteren.php">Solliciteren</a> <a href="producten.php">Bonussen</a> <a href="inlog.php">inlog</a> </div> <h1>Solliciteren bij jumbo</h1> <form action="" method="post"> <div class="gegevens">Voornaam:</div> <input type="text" name="voornaam"> <br> <div class="gegevens">Achternaam:</div> <input type="text" name="achternaam"> <br> <div class="gegevens">Leeftijd:</div><input type="text" name="leeftijd"> <br> <div class="gegevens">email:</div><input type=" text" name="email"> <br> <input type="submit" name="submit" value="Verzenden"> <br> <br> <?php if($submit) { if ($voornaam) { if ($achternaam) { if ($leeftijd) { if ($leeftijd > '15') { if ($email) { echo "Hallo $voornaam $achternaam, je sollicitate is binnen en je wordt binnekort gemail op <i> $email </i>"; } else { echo "Je hebt geen email ingevult"; } } else { echo "Met die leeftijd mag je niet werken"; } } else { echo "Je hebt geen leeftijd ingevuld"; } } else { echo "Je hebt geen achternaam ingevuld"; } } else { echo "je hebt geen voornaam ingevuld"; } } ?> </form> </body> </html>

Resultaat

Made by Thijs Aarnoudse