<?php

include "config.php";

$user=$_POST['username'];
$pwd=$_POST ['pwd'];

$db=mysql_connect ($db_host, $db_user, $db_password);

if ($db==FALSE)
die ("Errore nella connessione del database.");

mysql_select_db ($db_name,$db);

$query="SELECT nome,password,livello FROM utenti WHERE nome='$user' AND password='$pwd'";
$result=mysql_query ($query,$db);
if($num_righe = mysql_num_rows($risultato)){//restituisce il numero di righe in un risultato
echo ("Sei registrato");
}
else{
echo ("Non sei registrato");}

[/PHP]
prova cos' e fammi sapere




mysql_close($db);
?>