How to create a static html menu from a database


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I have built a small cms which allows me to create simple html pages and then upload them to an ftp.

Did you know?Explore Trending and Topic pages for more stories like this.
Everything is working apart from the menu, I cant get my head round how to create the menu system. The outputted file is a static html file that wont be connected to a database, so I need to retrieve the information from the database then write this information in standard html to a page before it is sent to the ftp.

I have looked through the forum and the net and can't find a solution, can anyone help?

CODE//// (which I know is incorrect, but kind of works and should hopefully show what I mean)

$page_name = mysql_query("SELECT * FROM pages WHERE page_display = 'yes' ORDER BY page_order ASC")
or die(mysql_error());


while($info = mysql_fetch_array( $page_name ))
{
$page[] = $info[page_name];
}

$navigation = <<<EOD


<li>$page[0]</li>
<li>$page[1]</li>
<li>$page[2]</li>
<li>$page[3]</li>


EOD;
No comments posted yet

Your Answer:

Login to answer
170 Like 51 Dislike
Previous forums Next forums
Other forums

Receive Rosettanet Message to SAP 4.6c
Dear all ,

My customer will send the PO details by rosettanet message , Is it

I am stumped
OK. Here is what I am trying to do. I have the conditions set, and if the conditions are met, I want

Adding Different Numbers From MySQL
Basically I have a mysql database with a couple prices as the following:

9.99
9.99
9.99

Help with page encoding issue and weird characters
I'm trying to write a screen scraper and when I pull out the lines of the html file that I'm interes

Format timestamp from mysql
When I tried this:
Code: date("m/d/Y H:i A", $row['timestamp'])
I got 12/31/1969 18:

extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only

foreach result into a single variable
Hi,

I have this code...

Code: [Select]foreach ($_POST['Interests'] as $interest =&

need help about
i store the value of my select statement result to an array and stored it to a variable named $fname

Any Good MMORPGs you've played?
I'm about to have ALOT of free time on my hands (finished highschool) and I need something to fill t

Sum of Values in an Array
This is probably really simple... but it's been years since I've written anything, so bare with me!<

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash