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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.