l112/H11/1.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>
</head>
<body>
<?php
$v = $_GET['voornaam'];
$a = $_GET['achternaam'];
if($n && $a){
echo"Je hebt de voornaam $v ingevuld en je achternaam is $a.";
}
elseif($v || $a){
echo"Je hebt niet alles ingevuld.";
f($v, $a);
}
else{
f('','');
}
function f($v, $a){
echo"<form method='get'action=''>";
echo"<input type='text'name='$v'>";
echo"<input type='text'name='$a'>";
echo"<input type='submit'value='posten'>";
echo"</form>";
};
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse