I'm trying to fetch several data from a select list.
I have the value as $_POST['valt_skift'].
But I also like to send name.
How can I do this?
This is what I got:
<select id="valt_skift" name="valt_skift">
<option></option>
<?php
//Loop put result
while($row = $stmt->fetch()){
echo '<option name="skift_name['.$row['skift_name'].']" value="'.$row["skift_type"].'">'.$row["skift_namn"].'</option>';
}
?>
</select>
The fetch:
$query_params = array(
':usr_skift' => $_POST['skift_name'][0], //Here is my question?!
':usr_skift_type' => $_POST['valt_skift']); //this will be the value