I'll start by putting my finger on what I think is wrong.
What reason would someone have to show only the number of registered?
I think this is wrong.I think you want to Tell users with a given name if it is: "is WRONG"
$sql = "SELECT * FROM usuarios";
$query = mysql_query($sql);
$conta = mysql_num_rows($query);
If I am right you will have a criterion to count ... is "CORRECT"
Put one in your html
<div id="user"></div>
and a field responsible for rescuing your criteria.
<input type="text" placeholder="Digite o nome da cidade"name="Campo" id="Campo" onchange="PgReal(this.value);/>
The function executes OnChange
When you change the value of field E it will return the values:
Pay attention to this = File.php? FieldName
$variavelCampoNome=$_GET['CampoNome'];
$sql = "SELECT * FROM usuarios WHERE 'Coluna' LIKE '%$variavelCampoNome%'";
if ($Resultado = mysql_query($sql)){ // Se ele conseguir executar
$conta = mysql_num_rows($Resultado);//faz a contagem
if ($conta==0){ //se FOR IGUAL A ZERO
echo 'Nenhuma Informação encontrada com esse criterio';
}else{ //Mostra a quantidade SE FOR DIFERENTE DE ZERO
echo '<span id="users">.$conta</span>';
while($Linha = mysql_fetch_array($Resultado)) {
//Criterios para exibir
$VariavelColuna=$Linha[ColunaExibir];
echo $VariavelColuna;
}
}
Now the function.
function PgReal(str) {
if (str == "") {
return;
} else {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("user").innerHTML = this.responseText; //Copia a resposta Para o div id=user
}
};
xmlhttp.open("GET","Arquivo.php?CampoNome="+str,true);//Exececuta o chamado usando o valor do campo que você colocou o botao ONCHANGE
xmlhttp.send();
}
}
I THINK IT WAS THIS WHAT YOU REALLY WANTED. More internet for this.
EDIT HOW AND WHERE TO FIND BETTER! Good luck