Help! Problem with listing all the pages listed in mySQL database

Please help what is going on???

The individual pages of my website are organized in 4 categories (home, about, processes, and interact)… My side bar navigation within each individual category works fine, but I am trying to set things up so that at the bottom of each page, You see a list of all the pages available for each category… Each category of the site has it’s own table (pages_home, pages_about, etc.) on the same database…

You can see the end result (which isn’t working) here:

Here is a simplified version of my code (just trying to build the list and then worry about styling):

require_once “script/connect_to_CMSdatabase.php”;

//Build Footer Navigation Lists --------------------------------------------------------------------------------------------

// Home ----------------------

$sqlCommand=“SELECT home_id, home_linklabel FROM pages_home WHERE home_showing=‘1’ ORDER BY home_pageorder ASC”;
$query1=mysqli_query($myConnection, $sqlCommand) or die (mysql_error());

while ($row = mysqli_fetch_array($query))
$home_pid = $row[“home_id”];
$home_linklabel = $row[“home_linklabel”];

$home_footerList .= '<a href="home.php?pid=' . $home_pid . ' >' . $home_linklabel . '</a><br />';


// About ----------------------

$sqlCommand=“SELECT about_id, about_linklabel FROM pages_about WHERE about_showing=‘1’ ORDER BY about_pageorder ASC”;
$query=mysqli_query($myConnection, $sqlCommand) or die (mysql_error());

while ($row = mysqli_fetch_array($query))
$about_pid = $row[“about_id”];
$about_linklabel = $row[“about_linklabel”];

$about_footerList .= '<a href="about.php?pid=' . $about_pid . ' >' . $about_linklabel . '</a><br />';


// Interact ----------------------

$sqlCommand=“SELECT interact_id, interact_linklabel FROM pages_interact WHERE interact_showing=‘1’ ORDER BY interact_pageorder ASC”;
$query=mysqli_query($myConnection, $sqlCommand) or die (mysql_error());

while ($row = mysqli_fetch_array($query))
$interact_pid = $row[“interact_id”];
$interact_linklabel = $row[“interact_linklabel”];

$interact_footerList .= '<a href="index.php?pid=' . $interact_pid . ' >' . $interact_linklabel . '</a><br />';



Here is the HTML portion of the page:



<?php echo $home_footerList; ?>


<?php echo $about_footerList; ?>


<?php echo $interact_footerList; ?> [/code]

Nevermind I fixed it… I was missing quotation marks and a “mysqli_free_result($query);” after one of the arrays… several things… all typos on my part… All fixed now! Thanks!

See how it looks:

Sponsor our Newsletter | Privacy Policy | Terms of Service