aynen öyle hocam. peki id, product, quantity adlı 3 kolonum olduğumu farzederek ayrı ayrı db ye nasıl insert edebiliriz.
Eğer id alacaksan bence name değerine id'yi ver.
yani
<input type="checkbox" name="checkbox[$urun_id]">
<input type="text" name="quanity[$urun_id]">
olsun.
<?php
if($_POST){//to run PHP script on submit
$qua = $_POST['quantity'];
$cl= $_POST['check_list'];
echo '<h2>ADDED</h2> ';
if(!empty($cl))
{
// Loop to store and display values of individual checked checkbox.
foreach($cl as $id=>$selected)
{
echo "ID: " .$id." \n";
echo "Product : " .$selected." \n";
if(isset($qua[$id])) echo "Quanity: ".$qua[$id]."\n";
@mysql_query("update tablo set quanity = '".$qua[$id]."' where id='$id'");
}
}
}
?>