Forum Moderators: coopster
the problem is when I chose an item from the menu it has to be highlighted.. it works for index.php and index_subj.php but when I go to the item i've added to mysql (url) (like guestbook.php) the menu remains unchangeable..
this is the function for the menu with my changes..
function public_navigation($sel_subject, $sel_page, $public = true) {
$output = "<ul class=\"subjects\">";
$subject_set = get_all_subjects($public);
while ($subject = mysql_fetch_array($subject_set)) {
$output .= "<div";
if ($subject["id"] == $sel_subject['id']) { $output .= " class=\"selected\""; }
$output .= "><a href=\"" . ($subject["url"]) .
"\">{$subject["menu_name"]}</a></div>";
$page_set = get_pages_for_subject($subject["id"], $public);
$output .= "<ul class=\"pages\">";
while ($page = mysql_fetch_array($page_set)) {
$output .= "<li";
if ($page["id"] == $sel_page['id']) { $output .= " class=\"selected\""; }
$output .= "><a href=\"" . urlencode($page["id"]) .
"\">{$page["menu_name"]}</a></li>";
}
$output .= "</ul>";
}
$output .= "</ul>";
return $output;
}
I've added in my database an "url" field but I can't manage to make a good menu
the menu has submenus
I think it's not related to css, it has to be a php and mysql problem.
thanx in advance :)
[edited by: eelixduppy at 11:42 pm (utc) on Oct. 9, 2008]