Ciao a tutti!

Il seguente frammento di codice:

codice:
<?php
$query_txt="SELECT * FROM DBPROVA WHERE USER='".$_POST[user]."' AND PASSWORD='".$_POST[password]."'";     
$queryprova=mysql_query($query_txt);
while ($row = mysql_fetch_array($queryprova))
{
 ...
}
?>
Mi restituisce il seguente messaggio:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in (la linea della mysql_fetch_array)
Non riesco ad individuare la causa.