Jump to content

Selecting multiple <option> values


evlive

Recommended Posts

This is probably a fairly simple question to most, but I'm a beginner so it's got me confused! I'm populating a the option for a select tag by simply preforming a mysql query and getting all the unique values. Now that's not an issue but what I want to do is by selection one of those options, pull two of the options due to a name change. Is this possible?

Link to comment
https://forums.phpfreaks.com/topic/113916-selecting-multiple-values/
Share on other sites

Sure....OK...

 

<select name="subject">

<option value="">All Subjects</option>';

while ($subject_row = mysql_fetch_array($subject_result)) {

echo "  <option value=\"" . $subject_row[0] . "\">" . $subject_row[0] . "</option>\n";

}

 

This populates the select tag....Then...

 

$subject = urldecode(@$_GET['subject']);

 

I believe this get's what the user selects when they hit the submit button. To general? I didn't write the app and it's not very well documented. So it makes it just that much harder.

 

-Thanks!

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.