I am new to php but i am tryng to make my own CMS for a website with MySQL and phpMyadmin.
Currently i am stuck at my navigation menu witch works just fine in a regular HTML.
I am using css sprite image to position the menu the way i want.
But i am currently getting only one of the menus all the way through my menu.
Like this: home , home , home , home , home , home.
I dont know how to make it work in php!
My code in index.php is :
<div id="navigation">
<ul id="navigation">
<?php
require("sources/connection.php");
$sql = "SELECT name, url, title FROM nav";
$result = $conn->query($sql) or die(mysqli_error());
if($result) {
while($row = $result->fetch_object()) {
echo "<li class='riis'><a href='{$row->url}' class='home' title='{$row->title}'>{$row->name}</a></li>";
}
}
?>
</ul>
</div><!-- end navigation -->
I just cant go from here... Been experimenting for 4 days now.
Please help a brother out
Thanks ALOT in advances!
neliuz