Re: checkbox value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



#   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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux