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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.