J
|
Jane 9/13/2006 |
Dave, if($LookupSQL) { LogInfo($LookupSQL); $rs=db_query($LookupSQL,$conn); if(!db_numrows($rs)) return ""; $ret='<input type=hidden name="value'.$ifield.'" value="'.htmlspecialchars($value).'">'; while($data=db_fetch_numarray($rs)) { if($data[0]==$value) $ret.='<input type="Radio" name="radio'.$ifield.'" onclick="java script: value'.$ifield.".value='".db_addslashes($data[0]).'\'; return true;" checked>'.htmlspecialchars($data[1])." "; else $ret.='<input type="Radio" name="radio'.$ifield.'" onclick="java script: value'.$ifield.".value='".db_addslashes($data[0]).'\'; return true;">'.htmlspecialchars($data[1])." "; } } else { $ret='<input type=hidden name="value'.$ifield.'" value="'.htmlspecialchars($value).'">'; foreach($arr as $opt) { if($opt==$value) $ret.='<input type="Radio" name="radio'.$ifield.'" onclick="java script: value'.$ifield.".value='".db_addslashes($opt).'\'; return true;" checked>'.htmlspecialchars($opt)." "; else $ret.='<input type="Radio" name="radio'.$ifield.'" onclick="java script: value'.$ifield.".value='".db_addslashes($opt).'\'; return true;">'.htmlspecialchars($opt)." "; } } |