Hi every one. I have a bit of a problem/ headache. I am trying to make a dropdown style menu for a website that runs off a CMS I made everything works fine but I can for the life of me get the menu system to work! This is the code I have:
function display_child($parent, $level){
$result = $dbc->prepare('SELECT linktext, visible, sort, parent FROM content WHERE parent =? ORDER BY sort');
$result->bind_param('s', $parent);
$result->execute();
$result->bind_result($menu_linktext, $menu_visible, $menu_sort, $sparent);
while ($row = $result->fetch()) {
echo "<li>".$menu_linktext."</li>\n";
display_child($sparent, $level+1);
}
}
display_child('','0');
I just hangs when I run it or gives me a : Call to a member function prepare() on a non-object error depending on its mood..