Jump to content

select from the database and echo how as a list


dazz_club

Recommended Posts

Hi guys,

 

i am working on a http://img170.imageshack.us/img170/937/flexmockdrinkpromotg0.jpg.

 

What i am trying to do is select the table that the second navigation is in (Game cards & Labels, Thermometers, Beer mats & coasters, Stirrers, Label & Packaging, P.O.S, Glassware).

 

And echo it out in how i desgined it.

 

I have currently turned it into html and css and now my next step is to implement php requirements.

 

Here is the html code for the second navigation

---

<ul id="LowerTier">
<li><a href="game-cards-and-labels.php" class="class2" title="Game cards & labels">Game cards & labels</a></li>
<li>|</li>
<li><a href="#" class="class2" title="Thermometers">Thermometers</a></li>
<li>|</li>
<li><a href="#" class="class2" title="Beer mats & coasters">Beer mats & coasters</a></li>
<li>|</li>
<li><a href="#" class="class2" title="Stirrers">Stirrers</a></li>
<li>|</li>
<li><a href="#" class="class2" title="Label & Packaging">Label & Packaging</a></li>
<li>|</li>
<li><a href="#" class="class2" title="Game cards & labels">Game cards & labels</a></li>
<li>|</li>
<li><a href="#" class="class2" title="P.O.S">P.O.S</a></li>
<li>|</li>
<li><a href="#" class="class2" title="Glassware">Glassware</a></li>
</ul>

 

This is the php script i am using to select the navigation from the table in the database;

---

<?php
$query = "SELECT * FROM subjects ORDER BY position ASC";
$result = mysqli_query ($connection, $query)or die(mysqli_connect_errno() . "<p>With query:<br>$query");
while ($row = mysqli_fetch_assoc($result)){
echo $row['menu_name'];
}
?>

 

What i would like to to is be able to have the same styling when i echo it out? is this possible? Any hints or advice or tuts, would be very much appreciated.

 

Kind regards

Dazzclub

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.