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

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

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

StringGrid issue in Delphi XE8 firemonkey mobile app -