for ($x = 1; $x <= $num; $x++) {
$userArray[] = $this->input->post("select" . $x . "");
}
$userArray = split(',', $userArray);
$productName = $userArray[0];
$barcode = $userArray[1];
$quantity = $userArray[2];
$flag = $this->cartmodel->productCategory($category);
}
코드의 가장 큰 문제는 배열 ....메시지가 : 오프셋 정의되지 않은 : 분할 기능과 값을 배열로 설정
로 걸립니다 ... $ userArray에 올 수없는 것입니다텍스트 상자를 통해 수량을 가져 오는 해요 .... 의심을 가지고 ..하지만
<input type="text" name ="Quantity<?=$i;?>" id = "Quantity<?=$i;?>" value=""/></td>
<select name="select<?=$i;?>"><option value="">NO</option><option value="<?=$row ->product_name;?>,<?=$row->barcode?>,<?=$i;?>">YES</option>
폭발 또한 예상됩니다. –