[eluser]alexaaaaaaaaaa[/eluser]
[quote author="aquary" date="1330328336"]ID does not matter. It was only about you were cloning an input which is not...arrayable. You see that the name is the same? Because of that, you'll always got only 1 value from a field with that name.
Try adding a bracket, then clone it.
Code:
<input type="text" name="mytext[]" id="mytext"/>
Else, if you'd like to have separate variable, you'd have to somehow append the name with a counter instead. PHP wised, the first method is easier to retrieve posted data.[/quote]
Thank you but now i'm getting an error i do this
Code:
for($i=0;$i<=3;$i++)
{
$data[] = array(
'field' => $this->input->post('text'),
'filed2' => $this->input->post('user')
)
}
$this->db->insert_batch('table', $data);