dhope Posted November 25, 2009 Share Posted November 25, 2009 Hi, I have setup a simple cms system which allows me to create a website on a different ftp through a simple interface. Because the new website I create isn't connected directly to the database I need to create the html and write the code to the page. I'm having some problems creating and adding to the navigation. I can get the information from the database but i'm not sure how to print the information as html so a standard page can read it without connecting to the database. I hope this makes sense, thanks in advance for any help CODE////// $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> /// CREATE THE LAYOUT $layout = <<<EOD <div id="container"> <div id="header"><h1>$company_description</h1></div> <div id="navigation"><ul>$navigation</ul></div> <div id="rotation"></div> <div id="contentarea"> <div id="sidebar"></div> <div id="content"> EOD; EOD; Link to comment https://forums.phpfreaks.com/topic/182906-php-database-retrieval/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.