通过多个选择数组循环的INSERT查询不起作用

I have a form with a multiple select input that passes its content via an array to php. I can't get the INSERT query to work, and my only return data to ajax gives me an empty alert box. I've narrowed it down to the php file, so I'm not going to attach the form or jQuery code. Any help would be appreciated.

-->"member" is the array passed from the multiple select.

$tmid = $_POST["team"];
$fltid = $_POST["flight"];

if ($con) {
if(isset($_POST["member"])){
    $i = 0;
    $members = ($_POST["member"]);
    foreach ($members as $member) {
        $memarr = explode('*', $member);
        $memid = $memarr[0];
        $indid = $memarr[1];
        $sql = "INSERT INTO FlightJoin (FlightID, MemberID, TeamID, IndID) VALUES ('$fltid', '$memid', '$tmid', '$indid')";
        $result = mysqli_query($con,$sql) or die(mysqli_error($con));
        $i++;
    }
    if($result){
     echo $i.'manifests successfully created.';
    }else{
     echo 'Problem occured adding record.';
    }
}else{
    echo 'data not received.';
}
}