grazie mille

Codice PHP:
<?php session_start(); if(isset($_SESSION['utente'])&& isset($_SESSION['password'])) { $nomecorso $_POST["nomecorso"]; $costo $_POST["costo"]; $ore $_POST["ore"]; if (!isset($_POST['submit'])) { // if page is not submitted to itself echo the form ?> <table> <tr><th> <?echo "Ciao " $_SESSION['utente'];?> <form method="post" action="<?php echo $PHP_SELF;?>"> <tr><th>Nome Corso:<th><input type="text" size="12" maxlength="50" name="nomecorso"> <tr><th>Docenti<th> <select name="docenti" > <option value="nome" selected>Seleziona</option> <?php $result mysql_query("SELECT nome FROM docenti"); while($row mysql_fetch_array($result)) { $nome$row['nome']; ?> <option value="<?php echo $nome?><?php if($docenti=="".$nome."") echo 'selected'?>><?php echo $row["nome"]; ?></option> <?php ?> </select> <tr><th>Costo:<th><input type="text" size="12" maxlength="50" name="costo"> <tr><th>Ore:<th><input type="text" size="12" maxlength="50" name="ore"> <tr><th colspan="5"><input type="submit" value="crea" name="submit"> </table> </form> <? } else { $conn mysql_connect('localhost'"gruppo""password"); mysql_select_db('my_gruppo'); $cur mysql_query (" INSERT INTO corsi VALUES ('$id_corso','$nomecorsi','$docente','$costo','$ore') "); $_SESSION=array(); // Desetta tutte le variabili di sessione. session_destroy(); //DISTRUGGE la sessione. exit; //si termina lo script //Chiudo la connessione con il database mysql_close($conn); } } else { echo "Accesso non consentito - Devi prima effettuare la login";?>
 <? ?>