Tezread wrote:...but I cannot see what is wrong
what is wrong depends entirely on the broader logic of your code, which is not at all clear from the snippet you posted. if all of the HTML is being output within PHP tags using [man]echo[/man] then the correct syntax might be:
<?php
echo '
a bunch of HTML here
a bunch more HTML here
<input type="checkbox" name="independent" value="1"';
if ($row['independent'] == 1) {echo 'checked';} echo '>
more HTML here
';
?>
if you are only using PHP to output just this particular bit then it might be:
a bunch of HTML here
a bunch more HTML here
<input type="checkbox" name="independent" value="1" <?php if ($row['independent'] == 1) {echo 'checked';} ?>>
more HTML here
you might want to read up on the basic syntax