jeudi 17 octobre 2019

can i use the checked atribute to check if my checkbox is checked

So I'm trying to see if a checkbox is checked in my project but I get an error when I try to use the checked atribute.

i have tried to figure it out with an if() statement and have tried multiple things like checked == true and stuff like that but it doesn't seem to work

this is what I've got at the moment:
<input <?php if(checked == "checked"){ value=1 }?> id="checkbox"> when I do this i get the error:
Use of undefined constant checked

I don't get the problem so if anyone can help me that would be cool.




Aucun commentaire:

Enregistrer un commentaire