adam291086 Posted December 9, 2007 Share Posted December 9, 2007 Heres the problem. I have a database query returning some result. These results need to be represented in the form of a check box. Is this possible? If so how? For example, if the result is ==Home tick the box else leave it blank. Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted December 9, 2007 Share Posted December 9, 2007 You could do this <?php if ($row['col'] == 'home') $checked = "checked='yes'"; else $checked = ""; echo "<input type='checkbox' name='name' value='val' $checked>"; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.