Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/06/2005, 08:18
inglualcaus
 
Fecha de Ingreso: junio-2005
Mensajes: 38
Antigüedad: 18 años, 10 meses
Puntos: 0
No muestra resultados

Hola soy nuevo programando en PHP y quisiera saber por que no me muestra los resultados una pagina de consulta, es decir no hace nada almenos creo yo deberia botar un error y nada, me gustaria saber si el PHP tiene depurador para mirarlo paso a paso las instrucciones.

el codigo es el siguiente.

<?php
if ($_POST['submit']) {

$link = mysql_connect("localhost", "user", "123")
or die("Could not connect");
//print "Connected successfully";
mysql_select_db("pruebas") or die("Could not select database");

/* Performing SQL query */
$aux=$_POST['acedula'];
$query = "SELECT cedula, nombres FROM cliente where cedula = '$aux' ";
$result = mysql_query($query) or die("Query failed");
/* Printing results in HTML */
print "<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=4>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\t<tr>\n";
foreach ($line as $col_value) {
print "\t\t<td>$col_value</td>\n";
}
print "\t</tr>\n";
}
print "</table>\n";

/* Free resultset */
mysql_free_result($result);

/* Closing connection */
mysql_close($link);
} else{
?>
<div align="center"><b>CONSULTA DE CLIENTE POR CEDULA</b></div><br>
<form method="post" action="<?php echo $PHP_SELF?>">
Cedula <input type="text" name="acedula">
<input type="Submit" name="submit" value="Aceptar">
</form>

<?php
} // end if
?>


Gracias...espero me entiendan...