Jump to content

drop down menu


pietbez

Recommended Posts

Hi, i know this is probably very basic but i have been banging my head and looking for tuts.

 

i have built a mysql php dropdown menu.

 

all displays fine. now, how do i get the menu to actualy take me to a new url?

 

the new url should be      www.mysite.com/"menu selection"

 

 

 

<?

include_once 'includes/db.php';

$result = mysql_query("select * from crimerate WHERE DISTRICT = 'Limpopo'", $con);

if (!$result) {
    die('Invalid query: ' . mysql_error());

}


$options="";

while ($row=mysql_fetch_array($result)) {

    $id=$row["id"];
    $crime=$row["CRIME"];
    $options.="<OPTION VALUE=\"$id\">$crime</option>";
}
?>


<SELECT NAME=crime>
<OPTION VALUE=0>Choose
<?=$options?>
</SELECT>

Link to comment
https://forums.phpfreaks.com/topic/260322-drop-down-menu/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.