$checkboxes{$boxname} = defined($params{$boxname})?"true":"false"; #where $params is a hash of the parameters, keyed by name #and $checkboxes is a hash of the values supplied to the sql