function correct_number($value) { return preg_replace("/[^0-9]/","",$value); } function isNum($val) { $pat = "^[0-9]+$"; if (ereg($pat, trim($val))) { return true; } else { return false; } } function check($val) { if( $var ) return "checked"; } function checked_radio($now, $test) { if ( $now == $test ) return 'checked'; return ''; } function checked_checkbox($now) { if ( $now ) return 'checked'; return ''; } function selected_select($now,$test) { if ( $now == $test ) return 'selected'; return ''; } ?>