PDA

Click to See Complete Forum and Search --> : Check Box


kiwis
Aug 9th, 2004, 09:08 PM
HI All,

I have a feild in my SQL table which has either a value of 0 or 1
I want my code to change my text box from not ticked if 0 and ticked if the value is 1.

any idea what the code would be?

visualAd
Aug 10th, 2004, 12:47 AM
Something like this:
<input type="checkbox" <?php if ($field): ?>checked="checked"<?php endif; ?> />