Using Check Boxes
Posted: Thu Jul 07, 2011 12:05 am
I have a snippet of code here that is "the same but different".
What would be the difference do you think ?
The VALUE="yes" is placed differently for some reason ......? To have a checkbox checked by default maybe ??
What would be the difference do you think ?
The VALUE="yes" is placed differently for some reason ......? To have a checkbox checked by default maybe ??
Code: Select all
<INPUT TYPE=CHECKBOX NAME="intelligent" <?php if($row['intelligent']=='yes'){echo "CHECKED";}?> VALUE="yes">Intelligent<BR />
<INPUT TYPE=CHECKBOX NAME="shy" <?php if($row['shy']=='yes'){echo "CHECKED";}?> VALUE="yes">Shy at first<BR />
<INPUT TYPE=CHECKBOX NAME="family_oriented" VALUE="yes" <?php if($row['family_oriented']=='yes'){echo "CHECKED";} ?>>Family oriented<BR />
<INPUT TYPE=CHECKBOX NAME="healthy_lifestyle" VALUE="yes" <?php if($row['healthy_lifestyle']=='yes'){echo "CHECKED";} ?>>Healthy lifestyle<BR />