#   index.php
<form method=post action=index.php>
<?php
$checked = ($_POST['CheckThis'] == 'Yes') ? 'checked' : '' ;
<input type=checkbox name=CheckThis value=Yes <?= $checked ?>>
<input type=Submit value=Submit>
</form>

-afan

William Stokes wrote:

Hello,

I have a checkbox in a form. How can I determine if the user has set the checkbox on or not?

Thanks
-Will




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to