Forum Moderators: coopster

Message Too Old, No Replies

PHP dropdown navigation menu

dropdown menu with php

         

shaid

1:27 pm on Dec 9, 2007 (gmt 0)

10+ Year Member



Hi all
Thanks for viewing my topics and hoping will get some help....!
Here is what i m looking for:
I want to build/(get source) a drop down navigation menu that will be controlled through php and mysql.
Can You make me forward>>>!
thanks in advance :)

adb64

1:47 pm on Dec 9, 2007 (gmt 0)

10+ Year Member



Shaid, welcome to Webmaster World!

You didn't provide much information but below a small piece of PHP code to generate a dropdownlist. It assumes the data for the list is in the array $listdata using it's key/value data.


echo "<select id='mylist'>\n";
foreach($listdata as $key => $value)
{
echo "<option value='$key'>$value</option>\n";
}
echo "</select>\n";

russkern

2:18 pm on Dec 9, 2007 (gmt 0)

10+ Year Member



Like adb said... you didn't provide much info.
If not a select menu, like what adb provided, what kind of menu?

A nav drop down that floats over a page like you see on a variety of sites?

R

shaid

4:44 pm on Dec 9, 2007 (gmt 0)

10+ Year Member



Hi adb64 and russkern
Thanks for your reply.
I m looking for help on <b>dropdown menu not dropdown list</b>
I can get dropdown menu with javascript or css...
but now i m looking it with php so that i can get control over the menu...:)
Thats it.
Thanks.

adb64

6:57 am on Dec 10, 2007 (gmt 0)

10+ Year Member



If you know how to make a dropdown menu using static HTML/JavaScript/CSS then you can use PHP to create the same kind of HTML/JavaScript/CSS for a dynamic menu.
Please provide us some more information and an example of what you want to do. No link please but some example HTML/JavaScript/CSS code.