You are here: Re: PLEASE HELP - PHP menus « PHP Programming Language « IT news, forums, messages
Re: PLEASE HELP - PHP menus

Posted by Dani on 07/31/07 19:49

<cpptutor2000@yahoo.com> schrieb im Newsbeitrag
news:1185857054.867928.107390@e16g2000pri.googlegroups.com...
> Could some PHP guru please help me? I am trying to create menus whose
> content will be extracted dynamically from a database table. What I am
> not sure about is how the information that is extracted from the
> database is to be sent to the menu.php file, if I am trying to use a
> include ... from inside another php file. Are there any simple
> examples anywhere? Any hints or suggestions would be of great help.
> Thanks in advance for your help.

hi,

if you are already using some menu.php file, than just get DB data from this
file directly (you don't need to forward it or something).

it could be something like this (for example you have some table menu with
following columns: menu_id, description, menu_order):

$sql = "SELECT menu_id, description FROM menu ORDER BY menu_order";
$result = mysql_query($sql);

while ($row = mysql_fetch_row($result)) {
print "<td>$row[1]</td>";
}

......

it is not complete, but it is quite simple..

greetz,
dani

 

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

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