Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

problem with while cycle and isset in php

I have this problem with while cycle and isset function: I want that every checkboxes checked rimane checked and those not checked rimane not checked after submit form.

while($dati_query_updte11 = mysql_fetch_array ($query_updte1)){
    echo '<input type="checkbox" value="si"';
    if(isset($checkk)){
        echo ' checked ';
    }else{
        echo ' ';
    }
    echo 'name="na5file[]">';
}

$checkboxes = isset($_POST['na5file']) ? $_POST['na5file'] : array();   
foreach($checkboxes as $key7 => $value) {
    $checkk = $checkboxes[$key7];   
}

Why it doesn't work ?

Comments