codice:
<?php
include "init.php";
include_once('tbs_class.php');
$TBS = new clsTinyButStrong;
$TBS->LoadTemplate('/home/b2bmomo/www/templates/templateb2bmomo.htm');
$TBS->Show();
if ($_SERVER['REQUEST_METHOD'] === 'POST'){
$query = "SELECT * FROM information_schema.tables";
$risultati=$db->mysqli_query($query);
while ( $row = $risultati->fetch_row() ){
$table = $row[0];
echo '<h3>'.$table.'</h3>';
}
}
?>
questa è la query della mia index che dovrebbe stamparmi tutte le tabelle presenti nel mio db al quale faccio la connessione in init.php che viene incluso, la parte html è caricata in un template tiny butstrong, questa la struttura dell html
codice:
<html>
<head>
<title>B2BMOMO</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="/include/css/bootflat.min.css">
<link rel="stylesheet" href="/include/css/app.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/s/bs/pdfmake-0.1.18,dt-1.10.10,af-2.1.0,b-1.1.0,b-colvis-1.1.0,b-html5-1.1.0,b-print-1.1.0,cr-1.3.0,fc-3.2.0,fh-3.1.0,kt-2.1.0,r-2.0.0,rr-1.1.0,sc-1.4.0,se-1.1.0/datatables.min.css"/>
</head>
<body>
<div align="center">ELENCA TABELLE PRESENTI NEL DB</div>
<form method="post" action="index.php" style="text-align: center;">
<INPUT type="submit" value="Invia">
<br><br>
</form>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="/include/js/bootstrap-contextmenu.js"></script>
<script type="text/javascript" src="/include/js/bootflat.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/s/bs/pdfmake-0.1.18,dt-1.10.10,af-2.1.0,b-1.1.0,b-colvis-1.1.0,b-html5-1.1.0,b-print-1.1.0,cr-1.3.0,fc-3.2.0,fh-3.1.0,kt-2.1.0,r-2.0.0,rr-1.1.0,sc-1.4.0,se-1.1.0/datatables.min.js"></script>
</body>
</html>
ora, io vorrei che cliccando il bottone nella index mi venga dato in output l'elenco delle tabelle presenti nel db, ma allo stato attuale la query
codice:
if ($_SERVER['REQUEST_METHOD'] === 'POST'){
$query = "SELECT * FROM information_schema.tables";
$risultati=$db->mysqli_query($query);
while ( $row = $risultati->fetch_row() ){
$table = $row[0];
echo '<h3>'.$table.'</h3>';
}
}
non mi stampa nulla, qualcuno ha qualche idea? grazie