mercredi 19 décembre 2018

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? thank you in advance...




Aucun commentaire:

Enregistrer un commentaire