Get value check box
<p><code>a_moip</code> and <code>a_google_analy</code> are integers in the database as the other strings</p>

<pre><code>&lt;?
@$c_google = $_POST['c_google_analystics'];
@$c_moip = $_POST['c_moip'];

$code = $_POST['google_analystic'];
$token = $_POST['moip_token'];
$key = $_POST['moip_key'];

if(isset($c_google) or isset($c_moip)) {

    if(!isset($c_google)) {
        $c_google == 0;
        $code == NULL;
    }
    else {
        $c_google == 1;
    }

    if(!isset($c_moip)) {
        $c_moip == 0;
        $key == NULL;
        $token == NULL;
    }
    else {
        $c_moip == 1;
    }

    $q = new Query;
    $q
            -&gt;update('config')
            -&gt;set(
                    array(
                        'a_google_analy' =&gt; $c_google,
                        'a_moip' =&gt; $c_moip,
                        'google_analy' =&gt; $code,
                        'moip_token' =&gt; $token,
                        'moip_key' =&gt; $key
                    )
            )
            -&gt;where_equal_to(
                    array(
                        'id' =&gt; 1 // bug fix
                    )
            )
            -&gt;run();
}
else {

    $q = new Query;
    $q
            -&gt;update('config')
            -&gt;set(
                    array(
                        'a_google_analy' =&gt; 0,
                        'a_moip' =&gt; 0,
                        'google_analy' =&gt; NULL,
                        'moip_token' =&gt; NULL,
                        'moip_key' =&gt; NULL
                    )
            )
            -&gt;where_equal_to(
                    array(
                        'id' =&gt; 1 // bug fix
                    )
            )
            -&gt;run();
}
?&gt;
</code></pre>

<p>I made a print in the array, the variable is not being treated, always appears when it is checked 'on'.</p>
