Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Help with dropdown menu

$
0
0

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


Viewing all articles
Browse latest Browse all 13200

Trending Articles