That query define 2 columns but 3 values. It looks like the order_id needs to be added as the first column if that is the proper value for $value. Furthermore, I don’t think you need to quote the order_id value because it is *probably an integer data type column. I say that because it sounds like a foreign key to what would be an auto increment primary key. Though I could be wrong. So just pointing that out.
foreach($_POST['100type'] AS $key=>$value) {
$sql = "INSERT INTO order_details_table
(order_id,block_type,block_quantity)
VALUES ({$value},
'{$_POST['100type'][$key]}',
'{$_POST['100quantity'][$key]}'
)";
$result = mysql_query($sql) or die('Could not insert data');
}
?>
Also, please look into preventing SQL injection. Right now this query is susceptible to a SQL injection attack. Ideally variable binding and prepared statements should be used to prevent SQL injection. Though the standard MySQL adapter does not support that easily. If this is a single isolated script I would highly recommend looking into an adaptor that provides an interface to easily use prepared statements with variable binding. Otherwise, the values can be escaped using mysql_real_escape_string. Though using mysql_real_escape_string is not the preferred nor most absolute method to prevent SQL injection. Again, if this is a single isolated script than consider using mysqli or pdo instead of the standard mysql functions. Otherwise, look into updating the antire application to use a more modern adaptor that supports prepared statements with variable binding.