lundi 14 mai 2018

Php Checkbox Undefined offset

 $row = mysqli_fetch_assoc($rsAppPage);
            $storeArray[] =  $row['Disabled'];  
            $str_out .= '
            <div class="row">
            <div class="form-group col-md-2">
            <input type="checkbox" name="Add" id="chk" data-contact_avl="val" value="1" checked='. $storeArray[0].'>Add
            <input type="checkbox" name="View" id="chk" data-contact_avl="val" value="2"  checked='. $storeArray[1]. '>View

I want to get the values from mysql and make the checkbox checked or not! I have a column Disabled in database which is 0 or 1.

I am stuck here: Undefined offset: 1,2..




Aucun commentaire:

Enregistrer un commentaire