HTML college: FORM validator
<div align='center'>
<?php
switch($_SERVER['REQUEST_METHOD']){
case 'POST': echo "Variabelen via POST<br><br>\n";
break;
case 'GET': echo "Variabelen via GET<br>\n";
echo "Het volgende was aan de URL geplakt:<br><em>?" .
$_SERVER['QUERY_STRING'] . "</em><br><br>\n";
break;
default: echo "Geen post of get, dit snap ik niet";
exit();
}
?>
</div>
<table align='center' border='1'>
<tr><th align='left'>Variabele</th><th align='left'>Waarde</th></tr>
<?php
switch($_SERVER['REQUEST_METHOD']){
case 'POST':
foreach($_POST as $key => $p){
echo "<tr><td>$key</td><td>$p</td></tr>\n";
} // foreach
break;
case 'GET':
foreach($_GET as $key => $p){
echo "<tr><td>$key</td><td>$p</td></tr>\n";
} // foreach
break;
} // switch
?>
</table>
<br><br>
<a href='javascript:history.go(-1);'>Terug</a>