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

(This post was last modified: 09-27-2017, 06:18 AM by Ali.)

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;
        
    } 
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