Question: I need to submit a form with multiple values

```
<form onsubmit="return false;">
<?php

echo "<select id=\"uname\" name=\"uname[]\" multiple>\n";

$sql = "SELECT * FROM users ORDER BY surname ASC";
$res = $db->query($sql);
while($row = $res->fetch()){
        $strA = $row["uname"];
        $strB = $row["givenname"];
        $strC = $row["surname"];
        echo "<option value=\"$strA\">$strC, $strB</option>\n";
}
echo "</select>\n";
echo "<input type='button' name='endreBruker' value='OK'   onclick='javascript:".$_POST['edit']."(this.form)'/>";
?>

```

and pass the POST values through this to newNote.php

```
function newNote(form) {
    $('#main').load ('newNote.php', {'uname[]' : form.uname.value} );
}

```

Problem is I only receive an array with a single value.

Answer: 
Check out [jQuery's serialize()](http://api.jquery.com/serialize/). You could then write something like this:

```
function newNote(form) {
    $('#main').load ('newNote.php', $(form).serialize() );
}

```
You may try something like that:

```
<select name="theselect" onchange="this.selectedIndex = 1;">  
<option value="Red">Red</option>  
<option value="Green" selected="selected">Green</option>  
<option value="Blue">Blue</option>  
</select>

```

Green color always been selected, but user may see other color, but don`t pick them