Ticking a check box based on a value from a record
am 27.05.2006 22:32:41 von Ian DaviesHello
I am retreiving records into a table (part of the code below)
?>
The last cell contains a check box, its value is set to $available. which is
a value of 1 or 0.
Trouble is I want the check box to be ticked if the value is 1 and unticked
if the value is 0
I thought of using a function such as
function checked($avail) {
if ($avail = $available) {
return 'checked';
}
}
after the value part of the code (where I have written MYFUNCTIONHERE)
which would put the work 'checked' in the appropriate place
but my inexperience means I cant get the syntax correct
can anyone help
Ian