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:
http://www.mysite.com/CMS_Test/test_footer_listing.php
Here is a simplified version of my code (just trying to build the list and then worry about styling):
[php]<?php
session_start();
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());
$home_footerList=’’;
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 />';
}
mysqli_free_result($query);
// 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());
$about_footerList=’’;
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 />';
}
mysqli_free_result($query);
// 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());
$interact_footerList=’’;
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 />';
}
mysqli_free_result($query);
?>[/php]
Here is the HTML portion of the page:
[code]
Home
About
Interact