Forum Moderators: coopster

Message Too Old, No Replies

PHP script to show all Tables

Does anyone know of a PHP script that will display tables

         

aaronjf

3:37 pm on Oct 15, 2002 (gmt 0)

10+ Year Member



Does anyone know of a PHP script that will show all the data from a table in a MySQL db?

andreasfriedrich

3:57 pm on Oct 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<?php
$db = mysql_connect("localhost","username","password");
mysql_select_db("bol", $db);
$query = mysql_query("SELECT * FROM links");
echo '<table border=1>';
while ($r = mysql_fetch_assoc($query)) {
echo '<tr><td>', implode('</td><td>',$r), '</td></tr>';
}
echo '</table>';
?>