PX : code

dbdump by Andrew
Download this code


<?php
//make your db connection first
//
// call function from php code as

dbdump("test");

function 
dbdump ($tablename)
    {
    
$sql="SELECT * FROM $tablename";
    
$result=mysql_query($sql) or die ("Could not display data"); 
        print 
"<table border=1>";
        while (
$get_info mysql_fetch_row($result))
        { 
        print 
"<tr>";
        foreach (
$get_info as $field
        print 
"<td><span class=dump>$field</span></td>";
        print 
"</tr>";
        }
        print 
"</table>";
    }

?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.