Re: html-php related questions
| From: | Vojtech Dvorak | Date: | Thu, 27 Jul 2000 06:51:51 +0000 |
| Subject: | Re: html-php related questions | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1555@lists.php.net to get a copy of this message | ||
I have made this to check or uncheck my checkbox:
<INPUT readonly <?php checked($claim) ?> name=claim type=checkbox>
where function:
checked()
function checked($value)
{
if ($value==1){
echo "checked"; }
else {
echo "";}
}
So, I can use everyvhere I need to check for true or false.
Hope this help
Vojtech
> Hi,
>
> I want a checkbox checked if the following statement is true
> if ($row_result[4]== 1)
> so how do I code this in the bit of html
>
> <td width=48% height=19><input type=checkbox name=C1 value=ON>Account
> collection </td>
>
> many thanks
>
> --
> Isabelle Roussy
> Bell Canada
> IS/IT - Billing Requirements
> 700 de La Gauchetiere W B8W2 Montreal Qc H3B 4L1
> Mailto:isabelle.roussy@bell.ca
> Office (514) 391-7939 Fax (514) 393-8162
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>