title: php - Database driven PHP navigation
body: <p>Lets say I have the following mysql table named <strong><code>pages</code></strong> :</p>
  
  <pre><code>--------------------------------------------------------------------
   id | menu_id | menu_text   | page_title  |  page_text             
  --------------------------------------------------------------------
   1  | 1       | Home        | Homepage    |  Here is the page text 
   2  | 2       | About Us    | About Us    |  "      "      "     " 
   3  | 3       | History     | Our History |  "      "      "     " 
  --------------------------------------------------------------------
  </code></pre>
  
  <p>How would I make this possible to display as a menu?</p>
  
  <pre><code>&lt;ul&gt;
   &lt;li&gt;&lt;a href="http://localhost/index.php?id=1"&gt;Home&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;Over&lt;/li&gt; 
    &lt;ul&gt; 
     &lt;li&gt;&lt;a href="http://localhost/speciaal.php"&gt;Wie zijn wij&lt;/a&gt;&lt;/li&gt; 
     &lt;li&gt;&lt;a href="http://localhost/index.php?id=12"&gt;Geschiedenis&lt;/a&gt;&lt;/li&gt; 
    &lt;/ul&gt; 
   &lt;li&gt;&lt;a href="http://localhost/afbeeldingen.php"&gt;Afbeeldingen&lt;/a&gt;&lt;/li&gt; 
   &lt;li&gt;&lt;a href="http://localhost/index.php?id=56"&gt;Contact&lt;/a&gt;&lt;/li&gt; 
  &lt;/ul&gt;
  </code></pre>
  
  <p>I am desperated as I tried to make a code all night long and now I am clueless about how I could accomplish this system. As you can see is the page system in the menu above but I olso want to direct some menu links to other files on my webserver. I will be really thankful if somebody could post a sample code or put me in a easy direction accomplish my goal.</p>
  
  <p>I do not know mutch yet about php.</p>