| 1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 
9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: | <?php
$server="localhost";
$user="root";
$pass="";
$dbase="datenbank";
$conn =@mysql_connect($server,$user,$pass);
if($conn){
mysql_select_db($dbase,$conn);
}else{
die("Verbindung zum Server defekt");
}
$sql = "SHOW TABLES";//so jetzt aber
$result = mysql_query($sql,$conn);
if ($result){
echo "<table border=1>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){
echo "<tr><td>";
echo implode("</td><td>",$row);
echo "</td></tr>\n";
}
echo "</table>";
echo "Abfrage:<i>$sql</i>";
}else{
echo "<p>".mysql_ERROR($conn);
}
mysql_close($conn);
?> |