$md5password=md5($_POST['password']); //generazione della password inserita nel database
$query_visualizzazione="SELECT * FROM '$tabutente'" .
" WHERE utente='{$_POST['utente']}' AND password='$md5password'";
$ptr_risultato_query=mysql_query($query_visualizza zione, $ptr_mysqls);
$numero_records=mysql_num_rows($ptr_risultato_quer y); // numero di righe di utenti nella query
mysql_close($ptr_mysqls); // chiude il collegamento al database
if($numero_records == 1)
{
// Utente identificato
$_SESSION['utente']=$_POST['utente'];
$_SESSION['password']=$_POST['password'];
$_SESSION['IP_utente']=$_SERVER['REMOTE_ADDR'];
header("Location:
http://" . $_SERVER['HTTP_HOST'] .
dirname($_SERVER['PHP_SELF']) . "/ricettario.php");
exit;
}