Hi,
can anyonme give me an idea of how to catch (using PHP) multiple values from a multi 'selectbox' please?
<select name="auto_issue_update" multiple>
<option>1</option>
<option>2</option>
</select>
Hi,
can anyonme give me an idea of how to catch (using PHP) multiple values from a multi 'selectbox' please?
<select name="auto_issue_update" multiple>
<option>1</option>
<option>2</option>
</select>
Make the name have brackets on the end to distinguish it as an array
<select name="auto_issue_update[]" multiple>
Then on the PHP side, you would do something like (if you're using POST for your form. swap POST for GET if you're not)
$auto_issue_update = $_POST['auto_issue_update'];
foreach ($auto_issue_update as $a){echo $a.' was selected <br />';}
define your select
this way :
<select name="auto_issue_update[]" multiple>
For PHP, I'm assuming that you POST your form :
$myresult = $_POST['auto_issue_update'];
foreach($myresult as $result) { ... }