Jump to content

Help with dropdown menu


thebiff335

Recommended Posts

Hi there so I am working on a project and I have a drop down menu created but I can't seem to get it to echo the item that gets selected from the menu...

 

echo "Select Id of Super or Function to edit";
echo "<FORM METHOD ='POST'>";
echo "<SELECT NAME='superList'>";
echo "<option disabled selected>Id</option>";

$q="SELECT * FROM box WHERE pid=0";
$res=mysql_query($q);
while($row=mysql_fetch_array($res)){

echo "<option value>$row[0]</option>";
}

echo "</SELECT>";
echo " <INPUT TYPE='Submit' VALUE='Select' NAME='superS' Title='Select Super/Function Box By Id' /></FORM>";

if(isset($_POST['superS'])){
$selected = $_REQUEST['superList'];
echo "button works";
echo $selected;
}

 

 

i have a test echo in my button and that displays but my $selected won't...any guidence would be appriciated

Link to comment
https://forums.phpfreaks.com/topic/277065-help-with-dropdown-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.