bè potresti usare questa funzione:
http://it2.php.net/manual/it/functio...l-num-rows.php

e ottenere una cosa di questo tipo:

<?php
$db=mysql_connect("localhost", "root", "");
mysql_select_db("utenti");
$user=$_POST['user'];
$pass=$_POST['pass'];
$sql="select user from utenti where user='$user' and password='$pass'";

$result= mysql_query( $sql , $db) ;

if ( mysql_num_rows( $result) == 1 )
echo "accesso negato" ;
else
echo "accesso effettuato";
?>