Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>hallo</title>
- </head>
- <body>
- <?php
- $voornaam = "";
- $achternaam = "";
- $voornaamFout = "";
- $invoerOK = false;
- if (!empty($_GET["verzendKnop"]) && $_GET["verzendKnop"] == "Verzenden") {
- if (empty($_GET["voornaam"]) || empty($_GET["achternaam"])) {
- print "Je hebt niet alle velden ingevuld ingevuld";
- } else {
- // alles ok
- $invoerOK = true;
- }
- if (!empty($_GET["voornaam"])) {
- $voornaam = $_GET["voornaam"];
- }
- if (!empty($_GET["achternaam"])) {
- $achternaam = $_GET["achternaam"];
- }
- }
- ?>
- <?php if ($invoerOK) { ?>
- <h4>bedankt</h4>
- <?php } else { ?>
- <form method="get" action="hallo.php">
- Voornaam: <input type="text" name="voornaam" value="<?php print $voornaam; ?>"><br />
- Achternaam: <input type="text" name="achternaam" value="<?php print $achternaam; ?>">
- <input type="submit" name="verzendKnop" value="Verzenden">
- </form>
- <?php } ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement