populate a checkbox

Hi I am having difficulty populating a checkbox on my edit form. In my new order form, the checkbox works fine and when checked signifies ‘Yes’ in my db. But when I am hoping to edit an order, I need the checkbox to already be “checked” if ‘Yes’ is in the db. here is my code so far for the edit portion.

<?php if ($carnet['Yes'] == "Yes")?> <?php echo "";

You forgot to specify the “checked” property within your tag. Must be:

[php] <?php if ($carnet['Yes'] == "Yes") { ?>

> <?php }?>[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service