yes, this line:
$WA_fieldValuesStr = "".((isset($_POST["agent_id"]))?$_POST["agent_id"]:"") ."";
should be edited to:
$WA_fieldValuesStr = "".((isset($_POST["agent_id"]))?implode(", ",$_POST["agent_id"]):"") ."";
if it is still not working, make sure that the values are being set on the checkboxes. Before submitting the page, view the page source and examine the source of the checkboxes to make sure they have a proper value.
can you send back the source of the page from the browser.