Welcome Guest, Not a member yet? Register   Sign In
pass many same values to model
#3

(09-27-2017, 08:39 AM)rtenny Wrote: In your case each input field has the same name. They are either called data_id or id. You need to create a input arrays
Try this
<input type="text" value="<?php echo $start_date; ?>" name="date_<?php echo $id; ?>[]">
<input type="hidden" value=<?php echo $id; ?> name="id[]">

uh it's too good.
then what code needs in controller ?  date_$id return 0

$start_date = $this->input->post("date_$id");
for($i=0; $i<count($start_date);$i++){
$count++;
}
Reply


Messages In This Thread
pass many same values to model - by Ali - 09-27-2017, 06:14 AM
RE: pass many same values to model - by rtenny - 09-27-2017, 08:39 AM
RE: pass many same values to model - by Ali - 09-27-2017, 04:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB