l205/PHP/H5P2.phpserver/Aantekeningen/2.19-5-24.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
$naam = $_GET['naam'];
if ($naam>10){
echo "$naam is groter dan 10!";
}
else{
showform('');
}
function showform($naam){
echo "<form method='get' action =''>";
echo "<input type='text' name='naam' value='$naam'>";
echo "<input type='submit' value='Posten'>";
echo "</form>";
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse