Tema: tabla en php
Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/05/2004, 10:04
Avatar de payo22
payo22
 
Fecha de Ingreso: noviembre-2002
Ubicación: México
Mensajes: 839
Antigüedad: 21 años, 5 meses
Puntos: 1
Código PHP:
$sql "SELECT * FROM agenda WHERE nombre LIKE '%$buscar%' ORDER BY nombre";

$result mysql_query($sql$link);

if (
$row mysql_fetch_array($result)){

echo 
"<table border = '1'> \n";

//Mostramos los nombres de las tablas

echo "<tr> \ndigo" style="margin-left: 50">echo "<tr> \n";

mysql_field_seek($result,0);

while (
$field mysql_fetch_field($result)){

echo 
"<td><b>$field->name</b></td> \n";

}

echo 
"</tr> \n";

do {

echo 
"<tr> \n";

echo 
"<td>".$row["id"]."</td> \n";

echo 
"<td>".$row["nombre"]."</td> \n";

echo 
"<td>".$row["direccion"]."</td> \n";

echo 
"<td>".$row["telefono"]."</td> \n";

echo 
"<td><a

href='mailto:"

href='mailto:".$row["email"]."'>".

$row["
email"]."</a></tdn";

echo "
</trn";

} while ($row = mysql_fetch_array($result)); 
echo "
</tablen"; 
espero te sirva