Welcome Guest, Not a member yet? Register   Sign In
Multiple Checkbox Saving in MySQL?
#2

[eluser]heavyman1[/eluser]
Code:
$data = array(
    'name'        => 'newsletter',
    'id'          => 'newsletter',
    'value'       => 'accept',
    'checked'     => TRUE,
    'style'       => 'margin:10px',
    );

echo form_checkbox($data);

You can use this to give each field name. So you can get the its value, by submitting the form.

Code:
$newsletter = $this->input->post('newsletter');

try to echo the var $newsletter to make u easier to understand


Messages In This Thread
Multiple Checkbox Saving in MySQL? - by El Forum - 07-05-2012, 07:40 AM
Multiple Checkbox Saving in MySQL? - by El Forum - 07-05-2012, 07:57 AM
Multiple Checkbox Saving in MySQL? - by El Forum - 07-05-2012, 08:06 AM
Multiple Checkbox Saving in MySQL? - by El Forum - 07-05-2012, 08:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB