Hello again!
I'm here with another PHP/Mysqli related question, I want to output the data i receive from the Query:
SHOW tables;
Into html code, more specific: links.
This is what i try'd to do:
<div class="container">
<div class="header" align="center">
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Databases</a>
<ul>
<?php
$mysqli = new mysqli('localhost','*****','*****','*****');
if ($mysqli->connect_error) {
die("Connection failed: " . $mysqli->connect_error);
}
$sql = 'show tables from osiris1q_mtg';
$result = $mysqli->query($sql);
if(!$result = $mysqli->query($sql)){
die('There was an error running the query [' . $mysqli->error . ']');
}
// output data of each row
while($row = $result->fetch_assoc()){
echo "<li><a href='#'></a>"$row"</li>";
}
} else {
echo "<li><a href='#'></a>0 results</li>";
} </ul>
</li>
</ul>
</nav>
</div> <!-- end .header -->
?>
This is the header.php file which is included in the actual index page.
This doesn't return anything not even the html parts of it.
Even all the files i have 'included' aren't showing up anymore.
I hope i explained myself good enough for anyone to understand
How Anyone can help me out!
Thank you in Advance!