Welcome Guest, Not a member yet? Register   Sign In
$this->input->post(‘checkbox’) gives its relative position and not its values. Is this the expected behaviour?
#1

[eluser]zrowcrypt[/eluser]
Model: (only relevant code shown)
==================================
$input_checkbox[‘pesonal_number’] = array (
‘name’ => ‘category_ckhbx_personal_number’,
‘id’ => ‘category_ckhbx_personal_number’,
‘value’ => ‘personal number’,
‘checked’ => false
);


$input_checkbox[‘work_number’] = array (
‘name’ => ‘category_ckhbx_work_number’,
‘id’ => ‘category_ckhbx_work_number’,
‘value’ => ‘work number’,
‘checked’ => false
);


echo “Personal Phone Number : ” .form_checkbox($input_checkbox[‘pesonal_number’]) . “<br>” ;
echo “Work Phone Number : ” .form_checkbox($input_checkbox[‘work_number’]). “<br>” ;


Controller: (Echoed for testing)
================================

echo $this->input->post(‘category_ckhbx_personal_number’);
echo $this->input->post(‘category_ckhbx_work_number’);

OUTPUT:
========
1 2
(guessing their position number) and not the value of the checkboxes


Messages In This Thread
$this->input->post(‘checkbox’) gives its relative position and not its values. Is this the expected behaviour? - by El Forum - 10-19-2010, 12:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB