Jump to content

Retrieving data from MySQL using multiple select drop down menu


kashif

Recommended Posts

Dear all,

 

I am trying to fetch data from MySQL using a multiple select drop down menu on a htm page. I use the follwing code:

 

<select name="indicator[]" size="6" multiple>

 

The multiple selections of 'indicators' (e.g. A, B, C) are then sent using the POST method to a php page. I think that I would have to use following code for making query:

 

$name = $_POST["indicator"];

$query= "SELECT * FROM table WHERE where name = '$name'";

$result = mysql_query($query);

 

But I do not know how to show the results. Please help me.

 

Best regards,

Kashif.

 

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.