Re: setting Check box
| From: | David Robley | Date: | Tue, 27 Mar 2001 04:37:13 +0000 |
| Subject: | Re: setting Check box | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45690@lists.php.net to get a copy of this message | ||
On Tue, 27 Mar 2001 13:55, Peter Houchin wrote:
> Hiya can some one pls let me know if i am on the right track pls, this
> is in a form that updates if there is an id else it inserts, now what i
> want it if there is an id i want the check box to be either checked or
> unchecked depending on the 'y' / 'n' value in the db
> <input type="checkbox" name="avail" value="" <? if ($avail
> == 'n') {
> echo 'SELECTED '; }?>">
> Peter Houchin
Try CHECKED for checkboxes - SELECTED works for dropdowns.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA