Your js should look like this:
var str = $("form").serializeArray();
$.ajax({
type: "POST",
url: "update.php",
data: str,
success: function(value) {
$("#data").html(value);
}
});
With php you have to encode an array of results.
$box = $_POST['box'];
foreach ($box as $x) {
echo $x;
}
Edit:
You should use the serializeArray function in jQuery. Then it will work with this code.
source
share