I would like to search for a client by ID in my database and to find it, show the code of the form here:
<form method="get" action="">
<p align="center">Cedula :<input name="cedula" type="text" value=""
id="celcliente">
<input name="consultar" type="submit" id="consultar" value="Revisar">
</form>
and here I have the PHP that I am using
<?php
if(isset($_GET["celcliente"]) &&
!empty($_GET["celcliente"])){
$cedula = $_GET["celcliente"];
$query = "SELECT celcliente, idcliente, nombreCliente FROM cliente WHERE
idcliente LIKE '%$celcliente%' ORDER BY nombreCliente ASC";
$ejecutar = mysql_query($query);
$total_reg = mysql_num_rows($ejecutar);
if($total_reg > 0){
while($registros = mysql_fetch_array($ejecutar)){
echo $registros['celcliente']."-";
echo $registros['idcliente']."-";
echo $registros['nombreCliente']."-";
}
}
else{
echo "No se encontraron resultados...!";
}
}
?>
The issue is that you can not find the data