<?
include("opendb.php"); 
if($del)
{
  $sql="delete from $tbl"; print $sql;
mysqli_query($db,$sql);
}

$re=mysqli_query($db,"show tables") or die(mysqli_error());
print "<table border=1>";
while($r1=mysqli_fetch_row($re))
{
 print "<form action='$PHP_SELF'><tr><td><input type=text name=tbl value='$r1[0]'></td>";
 $r2=mysqli_query($db,"select count(*) from $r1[0]");
  $row=mysqli_fetch_row($r2);
   print "<td>$row[0]</td><td><input type=submit name='del' value='del'></td></tr></form>";
}
?>
