[eluser]Unknown[/eluser]
Just want to validate with codeigniter if at least one of the following checkbox fields is checked (without using jquery or javascript). Please help me
Code:
$data = array(
'name' => 'cat',
'id' => 'cat',
'value' => 'accept',
'checked' => FALSE,
'style' => 'margin:10px',
);
echo form_checkbox($data);
echo form_label("Cat<br>","cat");
$data = array(
'name' => 'dog',
'id' => 'dog',
'value' => 'accept',
'checked' => FALSE,
'style' => 'margin:10px',
);
echo form_checkbox($data);
echo form_label("Dog<br>","dog");
$data = array(
'name' => 'parrot',
'id' => 'parrot',
'value' => 'accept',
'checked' => FALSE,
'style' => 'margin:10px',
);
echo form_checkbox($data);
echo form_label("Parrot<br>","parrot");