Hello CI members
i need your help. first get all records in date column and display in view, After submit all date data pass to controller, they will be stored as Unix format.
i do't know how to handle they values to model. please check my source
VIEW:
PHP Code:
<form method="post" action="convert_date_script/convert_do">
<input type="submit" value="submit">
<?php
foreach($get as $value_get){
$id = $value_get['id'];
$start_date = $value_get['start_date_license'];
?>
<p>
#<?php echo $id; ?> : <input type="text" value="<?php echo $start_date; ?>" name="date_<?php echo $id; ?>">
<input type="hidden" value=<?php echo $id; ?> name="id">
</p>
<?php
}
?>
</form>
CONTROLLER:
PHP Code:
public function convert_do(){
$count=0;
$id = $this->input->post('id');
$start_date = $this->input->post("date_$id");
for($i=0; $i<sizeof($start_date);$i++){
//$start_date1 = explode("_",$start_date);
//$start_date_jmktime = jmktime($start_date);
//$changed = $this->convert_date_script_model->convert_date($id,$start_date_jmktime);
$count++;
}
echo $count;
}