Welcome Guest, Not a member yet? Register   Sign In
when repopulate of input item insert as null
#1

Code:
<input type="number" id="primaryincome1"  min="1"  max="999" name="noc[]"
value="<?php echo (!isset($student1['noc'])) ? 0 : $student1['noc'] ?>" >

<input type="number" id="primaryincome2"  min="1"  max="999" name="noc[]"
value="<?php echo (!isset($student2['noc'])) ? 0 : $student2['noc'] ?>">

<input type="number" id="primaryincome3"  min="1"  max="999" name="noc[]"
value="<?php echo (!isset($student3['noc'])) ? 0 : $student3['noc'] ?>" >

<input type="number" id="primaryincom4"  min="1"  max="999" name="noc[]"
value="<?php echo (!isset($student4['noc'])) ? 0 : $student4['noc'] ?>" >

<input type="number" id="primaryincome5"  min="1"  max="999" name="noc[]"
value="<?php echo (!isset($student5['noc'])) ? 0 : $student5['noc'] ?>" >

<input type="number" id="primaryincome6"  min="1"  max="999" name="noc[]"
value="<?php echo (!isset($student6['noc'])) ? 0 : $student6['noc'] ?>"


Code:
$certids = $this->input->post('certid');  
$nocs = $this->input- >post('noc');
$result = array();
foreach ($certids as $index=>$certid)
{
   $result[] = $certid . '_' . $nocs[$index];
}

echo '<pre>';print_r($result);echo '</pre>';
after I made changes in the input item, it gives an output:

Code:
Array
 (
[0] => 1_2
[1] => 2_2
[2] => 3_2
[3] => 4_2
[4] => 5_2
[5] => 6_2
[6] => 7_
 )
Reply


Messages In This Thread
when repopulate of input item insert as null - by kvanaraj - 09-17-2018, 02:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB