Thank you so much Ray. Your idea worked. I removed the redirect and the records were inserted based on the number of prt_id records. However, that gave me a different route to the project. I changed
$InsertQuery->bindColumn("mds_id", "i", "".($_POST["mds_id"][$x]) ."", "WA_DEFAULT");
$InsertQuery->bindColumn("ptid", "i", "".($_POST["ptid"][$x]) ."", "WA_DEFAULT");
$InsertQuery->bindColumn("mda", "s", "".((isset($_POST["mda"]))?implode(",",$_POST["mda"]):"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("projectteam", "s", "".((isset($_POST["projectteam"]))?implode(",",$_POST["projectteam"]):"") ."", "WA_DEFAULT");
So that the entries will reply on only one multiple row entries which is the prt_id records.
I am so grateful