function VisTabeller() {
global $servername, $username, $password, $database;
$conn = mysqli_connect($servername, $username, $password, $database);
if (!$conn) {
die("Tilkobling til database feilet: " . mysqli_connect_error());
}
$resultAll = mysqli_query($conn, "SHOW TABLES FROM `$database`;");
if(!$resultAll){
die(mysqli_error($conn));
} else {
$i = mysqli_num_rows($resultAll);
if ($i > 0) {
echo "
"."Dette er tabellene i databasen ".$database.":"."
";
while($rowData = mysqli_fetch_array($resultAll)){
// echo " *** " . " Klokka e " . date("h:i:sa")."
";
echo $rowData['0']."
";
}
}
mysqli_close($conn);
}
}