jkkenzie Posted October 14, 2008 Share Posted October 14, 2008 Hi! If a value in my database field say "Receipt Issued" = 1 or 0, what would be included in this code so that my check box shows a TICK or No TICK: <input type="checkbox" name="Receipt_Issued" value=" <?php xx ?>" /> Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted October 14, 2008 Share Posted October 14, 2008 <input type="checkbox" name="Receipt_Issued" value="1" <?php if ($issued) { echo 'checked="checked"'; } ?>/> Something like this. Quote Link to comment Share on other sites More sharing options...
New Coder Posted October 14, 2008 Share Posted October 14, 2008 <input type="checkbox" name="Receipt_Issued" value="1" <?php if ($issued) { echo 'checked="checked"'; } ?>/> Something like this. I've tried the above but it didnt work for me so if you find it doesn't work also try <input type="checkbox" name="Receipt_Issued" <?php if ($issued=='1') { echo "checked"; }?> /> Quote Link to comment Share on other sites More sharing options...
jkkenzie Posted October 15, 2008 Author Share Posted October 15, 2008 Thanks it worked 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.