You are here: menu « PHP Programming Language « IT news, forums, messages
menu

Posted by up2trouble on 06/29/07 01:36

I'm trying to create a dynamic menu with plain text links ... no
javascript, no css, no dhtml, etc. Ideally, the top level categories
have sub-menus. I got the top level, but I can't get the sub level.

| Home | Courses | Personal | Admin |

<?PHP
$result_parent = mysql_query("SELECT * FROM $db_table6 WHERE parent =
'Main' AND sublevel2 != '1' ORDER BY sublevel2 ASC ");
echo " | ";
while ($row = mysql_fetch_array($result_parent))
{
$name = $row['name'];
$url = $row['url'];
echo "<A CLASS='nav' HREF='http://lynnesmith.net/$url' ALT='$name'
TARGET='_top'>$name</A>";
echo " | ";
}
?>

record parent sublevel2 sublevel3 name url
1 Main 0 0 Home index.php
2 Main 1 0 Address Book addressbook.php
4 Personal 2 1 personal/ab_addperson.php
16 Main 2 0 Courses courses/index.php
6 Admin 1 1 Edit Blog admin/blogentryedit.php
7 Courses 1 0 CITA 110 courses/cita110index.php
8 Courses 2 0 CITA 210 courses/cita210index.php
10 Admin 2 1 Add Address Book Category admin/ab_category.php
11 Courses 3 0 CITA 330 courses/330index.php
12 Courses 3 1 Webmaster Tools courses/330tools.php
13 Main 1 0 Reading Room news.php
14 Main 4 0 Admin admin/index.php
17 Main 3 0 Personal personal/index.php

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация