how to make it better and simplier:
for($i=0; $i < count($_POST["networking"]); $i++) {
$networking .= $_POST["networking"][$i] . "\r\n";
how about this:
$networking=implode("\r\n" , $_POST["networking"]);
echo $networking;
maybe this helped, its good to know that the way you make this project sounds to me a poor designed database model.
You should use a connector table to store the checkbox and selections pairs.
trim function is nog good enought to protect your database from SQL injection.
you can solve like this:
$Array=array_map("mysql_real_escape_string",$Array);
extract($Array);
extract($Array, EXTR_PREFIX_SAME, "posted_");
// your query will chaned to:
$Query="INSERT into $TableName values ('0', '$posted_name', '$posted_email', '$posted_newsletter', '$posted_heard_about', '$networking', '$posted_comments')";
To have better way you access and use mysql database, watch PDO extension.