tengo el siguiente código:
Código PHP:
$sql = "SELECT dni FROM clientes WHERE dni='$dni'";
$result = mysql_query($sql);
if(mysql_fetch_array($result))
{
echo "Error, dni ya registrado por otro usuario";
echo "<input type='button' value='Atras' onClick='history.go(-1);'>";
$_POST['error']=0;
}
Warning: mysql_num_rows() expects parameter 1 to be resource, string given in C:\wamp\www\tienda\logica_datos\existe_cliente.php on line 13
Siendo la linea 13, la línea del if.
¿Qué narices es?
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)