If i want to disable a checkbox with html i need to insert it in input tag.
<input type="checkbox" class="someone" name="any" disabled> html
But if i want to build it with PHP and disable depends on a condition i will write:
$question = 'foo';
echo '<input type="checkbox" class="someone" name="any"';
if ($question == 'foo'){
echo 'disabled';
}
echo '">php';
echo '<br>';
echo '<input type="checkbox" class="someone" name="any" disabled> html';
If you try you will see form google devtools that are write at same way but only html works
Why????
Aucun commentaire:
Enregistrer un commentaire