Citar
<html>
<body>
<?php
$link = mysql_connect("localhost", "root", "111");
mysql_select_db("Alumnos", $link);
$result = mysql_query("SELECT apellido_1 FROM chicos", $link);
if ($row = mysql_fetch_array($result)){
echo "<table border = '1'> \n";
echo "<tr> \n";
echo "<td><b>Nombre</b></td> \n";
echo "</tr> \n";
do {
echo "<tr> \n";
echo "<td>".$row["apellido_1"]."</td> \n";
echo "</tr> \n";
} while ($row = mysql_fetch_array($result));
echo "</table> \n";
} else {
echo "¡ La base de datos está vacia !";
}
?>
<body>
<?php
$link = mysql_connect("localhost", "root", "111");
mysql_select_db("Alumnos", $link);
$result = mysql_query("SELECT apellido_1 FROM chicos", $link);
if ($row = mysql_fetch_array($result)){
echo "<table border = '1'> \n";
echo "<tr> \n";
echo "<td><b>Nombre</b></td> \n";
echo "</tr> \n";
do {
echo "<tr> \n";
echo "<td>".$row["apellido_1"]."</td> \n";
echo "</tr> \n";
} while ($row = mysql_fetch_array($result));
echo "</table> \n";
} else {
echo "¡ La base de datos está vacia !";
}
?>