<?
if (!($c = $_POST["cognome"])) die ("Dati incompleti - Manca Cognome");
if (!($n = $_POST["nome"])) die ("Dati incompleti - Manca Nome");
if (!($m = $_POST["matricola"])) die ("Dati incompleti - Manca Matricola");
$v = $_POST["voto"];
//recupera esame e crediti della materia selezionata
list($esame, $crediti) = explode('#', $_POST["esame"]);
//scrive sul file
$fp = fopen("out.txt", "a");
fwrite($fp, "$c;$n;$m;$esame;$v;$crediti");
fclose($fp);
?>
<html>
<head>
<style>
select {width:160px;}
td, body {font-family:Verdana; font-size:10pt}
</style>
</head>
<body>
<h3>Esame Web Programming del 12/07/2004 (B) - II pagina</h3>
Dati registrati!!
<a href="<? echo $_SERVER["HTTP_REFERER"] ?>">Torna indietro</a>
</body>
</html>