php - echoing a checkbox inside an echoed form -


i have echo of form , echo of radio button use this:

//works fine. value='0' ";if ($row["werkverwijder"] == '0') { echo "checked"; } 

for textarea use this:

//works fine. ".$row["overmij"]."</textarea></td> 

but when comes checkbox i'm @ complete loss. tried:

value='1' "; if($row["fav"] == 'checked') { echo "checked"; } 

but doesn't work. tried whole lot of other combinations still not getting anywhere.

anyone can me this?

you haven't provided code it's difficult anything, should work. note spaces:

<input type="checkbox" name="sth" <?php if($row["sth"] == "checked"{echo "checked";})?> > 

check developer console errors.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -