l208/opdrachten/11.3.php
<!DOCTYPE html>
<html lang="en">
<head>
<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>
<?php
$age = $post['age'];
$class= $post['class'] ;
if($age && $class){
echo "jou leeftijd is $age en je zit in klas $class";
}
echo "<form method='get' action=''>
<div>leeftijd: <input type='text' name='leeftijd' value='$age'></div>
<div>klas: <input type='text' name='klas' value='$class'></div>
<p><input type='submit' value='Verzenden'></p>";
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse