Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/06/2010, 00:26
mevgdea
 
Fecha de Ingreso: junio-2010
Mensajes: 7
Antigüedad: 13 años, 10 meses
Puntos: 0
espacio en blanco

Hola a todos, el la primera vez que visito el foro y quisiera me ayudaran con el siguiente codigo, es un busueda de datos de usuarios, la busqueda esta correcta el problema es que al presentar las coinsidencias, este deja muchos espacios entre el titulo y la tabla con los datos, lo cual no se ve bien porque hay que bajar a buscar la tabla.
Alguien me puede decir que debo quitar o poner pues la verdad ando perdida.
Mil Gracias

Código HTML:
<?php
			require_once('conexion.php');
			require_once('fondo.html');
	
echo"<html>
<head>
<title>Busqueda en Ficha Social</title>
</head>
<body>
			<font color='purple' face='Felix Titling'>
			<center> <h3>BUSQUEDA DE USUARIOS </h3> </center></font>
			<b><i>
			<font color='purple' size='2' face='Helvetica'>";		

$busqueda = $_POST[registro];
if ($_POST[registro]=='')
{
echo "<p> <br><br><br><center>  ¡¡DEBE ESCRIBIR EL NOMBRE A BUSCAR!! $_POST[registro] </center>  </p> \n";
echo"<font color='purple' size='2' face='Helvetica'>";
echo"<center><br><br><br><a href='buscar.php' target=_self> Regresar a Buscar</a></center><br><br>";
echo "</html></body> \n";
exit;
}  				
echo "<center><table border= '2' CELLSPACING='1' bordercolor='purple' width='90%'>  \n";
echo "<tr> \n";
while ($field = @mysql_fetch_field($resultado)){

echo "<th>$field->name</th> \n";
}
echo "</th> \n";

echo "<th valign='top'>"."No.Registro"."</th> \n";
echo "<th valign='top'>"."Nombre"."</th> \n";
echo "<th valign='top'>"."Direcci&oacute;n"."</th> \n";
echo "<th valign='top'>"."Tel&eacute;fono"."</th> \n";
echo "<th valign='top'>"."Acci&oacute;n"."</th> \n";
echo "</th> \n";
$SQL="SELECT * FROM usuario_principal WHERE nombre LIKE '%$_POST[registro]%' ORDER BY nombre";

$resultado=@mysql_query($SQL)or die( "Error en query: $SQL, el error  es: " . mysql_error()); 
	
if($row=@mysql_fetch_array($resultado, MYSQL_BOTH)){
do
 {
echo "<tr> \n";
echo "<td>".$row["id_usuario"]."</td> \n";
echo "<td>".$row["nombre"]."</td> \n";
echo "<td>".$row["direccion"]."</td> \n";
echo "<td>".$row["telefonos"]."</td> \n";							
echo  "<td>"."<a href=efsdato.php?registro=" .$row ["id_usuario"] . "		target=_self> Actualizar </td> \n</a><br>";
echo "</tr> \n";
} 
while ($row = @mysql_fetch_array($resultado));
echo "</table> \n";
} 
else { 
echo "<center>¡ EL REGISTRO NO EXISTE !<br><br><br>";
}

		echo"	<br>
			<font color='purple' size='2' face='Helvetica'>
			<center><a href='buscar.php' target=_self> Regresar a Buscar</a></center><br><br>
			</b></i>
			</td>
			</tr>
			</font>
</body>
</html>";
?>