Código PHP:
<?php
mysql_connect("localhost","*******","****");
@mysql_select_db("ligainterna") or die( "Imposible seleccionar base de datos");
$result = mysql_list_tables("ligainterna");
If (!$result) {
echo "DB Error, No se pueden listar las tablas";
echo "<br/>";
echo 'MySQL Error: ' . mysql_error();
}
While ($row = mysql_fetch_row($result)) {
echo "Tabla: $row[0]";
echo "<br/>";
}
mysql_free_result($result);
?>
<html>
<body>
<?php
$link = mysql_connect("localhost", "******","***");
mysql_select_db("ligainterna", $link);
$result = mysql_query("SELECT nombre, mensaje FROM mensajes", $link);
echo "<table border = '1'> \n";
echo "<tr> \n";
echo "<td><b>Nombre</b></td> \n";
echo "<td><b>Mensaje</b></td> \n";
echo "</tr> \n";
while ($row = mysql_fetch_row($result)){
echo "<tr> \n";
echo "<td>$row[0]</td> \n";
echo "<td>$row[1]</td> \n";
echo "</tr> \n";
}
echo "</table> \n";
?>
</body>
</html>
ayuindenme gracias