view page code
<td align="left" valign="middle" bgcolor="#FFFFFF" class="rows">
<input type="text" name="Quantity" id="Quantity" value="<?= $row->Quantity ?>" />
Controller code
$category = $this->input->post('Category');
$num = $this->input->post('numOflimit');
$productName = $this->input->post('product_name');
$barcode = $this->input->post('barcode');
$quantity = $this->input->post('Quantity');
for ($x = 1; $x <= $num; $x++) {
$userArray = $_POST["select$x"];
}
$userArray = split(',', $userArray);
$productName = $userArray[0];
$barcode = $userArray[1];
$quantity = $userArray[2];
$flag = $this->cartmodel->getProductNames($category);
print_r($flag);
The problem in the code is that it is able only to fetch the last text box value and the output of
$userArray it is taking as Array
and
$flag = CI_DB_mysql_result Object (
[conn_id] => Resource id #27
[result_id] => Resource id #36
[result_array] => Array ( )
[result_object] => Array ( )
[current_row] => 0
[num_rows] => 0
)
What wrong with the code???