From your code it seems like you are just looping through the inputs and inserting them into the database?
It may be easier for you to do something like this...
first, give all of your inputs the same name and end the name with . For example, you may want to name them all coid.
Then, in your php script...
//since we added the , $coid is now an array of coid form variables
//we want to enquote each and join them all into one string, separated by commas
$values = "'" . implode("','", $coid) . "'";
$result=mysql_query("INSERT into tblwhatever (coid) VALUES ($values)");
I'm pretty sure that will work, but the code may require a little bit of tweaking.