Dynamic PHP drop down menu - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-29-2009, 03:16 PM   #1 (permalink)
Junior Member
 
Dvlpmnt_Ranger's Avatar
 
Join Date: Jun 2009
Posts: 5
Exclamation Dynamic PHP drop down menu

Hello everyone,
I am creating a dynamic drop down menu off of a mySQL database, I need to make these options so that they are links to jump to another portion of my site. Any help would be greatly appreciated. here is what I have running so far.

code:
//drop down model select............................................ ..................
$sql="SELECT model FROM aedvalues";
$result=mysql_query($sql);
mysql_close();
$options="";
while ($row=mysql_fetch_array($result))
{
$id=$row["model"];
$options.="<OPTION VALUE=\"$id\">" .$id;
// \"$id\">"
}//end of while loop
?>
...
Choose AED Model
...
<SELECT NAME=thing>
<OPTION VALUE=0>Choose
<?=$options?>
</SELECT>
...
<?php

Thanks!
Dvlpmnt_Ranger is offline   Reply With Quote
Sponsored Links
Old 07-05-2009, 03:36 PM   #2 (permalink)
Junior Member
 
Join Date: Jul 2009
Posts: 24
Default Re: Dynamic PHP drop down menu

You have two options with a select type dropdown to get the user to another page after they choose it from the dropdown. The first is to use onChange='javascript_function()' in the opening select tag. When the form changes, the javascript_function() would execute. You can also use your standard submit button <input type="submit" value="Go" /> or something like that. I'm not really sure what your question is, but I think this information should be helpful.
user24 is offline   Reply With Quote
Old 07-06-2009, 02:30 PM   #3 (permalink)
Junior Member
 
Dvlpmnt_Ranger's Avatar
 
Join Date: Jun 2009
Posts: 5
Default Re: Dynamic PHP drop down menu

Thank you very much for the help, calling a JavaScript function works out pretty good.
Dvlpmnt_Ranger is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 04:20 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting