<?
//legge file e riempie array $esame e $crediti con i dati prelevati
$file = file("elenco.txt");
foreach ($file as $row) {
list($esame, $crediti) = explode(':', $row);
$esami[$esame] = $crediti;
}
?>
<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)</h3>
<form action="EsamePW_12_07_04(B)_b.php" method="post">
<table border width=500 cellpadding=7>
<tr>
<td>Cognome</td><td><input name=cognome></td>
<td>Nome</td><td><input name=nome></td>
<td>Matricola</td><td><input name=matricola></td>
</tr>
<tr>
<td colspan=3 align="center"> Esame
<select name=esame>
<? foreach ($esami as $e => $c) echo "<option value='$e#$c'>$e"; ?></select>
</td>
<td colspan=3 align="center"> Voto
<select name=voto>
<? for ($i=18;$i<=30;$i++) echo "<option value=$i>$i"; ?></select>
</td>
</tr>
<tr>
<td colspan=6 align="center">
<input type="SUBMIT"> <input type="RESET">
</td>
</tr>
</table>
</form>
</body>
</html>