Hi,
I have the following bit of PHP that is not working. I am basically trying to put together a menu structure:
Code:
<?php
$sql = "SELECT * FROM PCNET_$filename WHERE page_type='TOP_PAGE' AND live='checked' AND page_order!='x' ORDER BY parent_code, ABS(page_order), title";
$sql_result = mysql_query ($sql, $connection ) or die ('request "Could not execute SQL query" '.$sql);
while ($row = mysql_fetch_assoc($sql_result)) {
echo '<dt><a href="'.($row["link"]).'?id='.($row["id"]).'">'.($row["menu_title"]).'</a></dt>';
if ($row["parent_live"]=='checked') {
include ('subgridmenu.php?parent_code=';
echo ($row["id"])'');
};
};
?>
It shows all the pages in the menu list OK, but will not display anything in the subgridmenu.php file, which is as follows:
Code:
<?php
$sql = "SELECT * FROM PCNET_$filename WHERE page_type='SUB_PAGE' AND live='checked' AND page_order!='x' ORDER BY ABS(page_order), title";
$sql_result = mysql_query ($sql, $connection ) or die ('request "Could not execute SQL query" '.$sql);
while ($row = mysql_fetch_assoc($sql_result)) {
echo '<dd><a href="'.($row["link"]).'?id='.($row["id"]).'">'.($row["menu_title"]).'</a></dd>';
}
?>
Can anyone give me any pointers as to why?
Thanks,
Neil