Browse Source

float check

master
Robin Thoni 10 years ago
parent
commit
819b77ae9a
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      utils.php

+ 5
- 0
utils.php View File

38
   return get_param($_GET, $key, $is_error);
38
   return get_param($_GET, $key, $is_error);
39
 }
39
 }
40
 
40
 
41
+function check_float($f)
42
+{
43
+  return ($f == (string)(float)$f) ? $f : null;
44
+}
45
+
41
 function check_table_field($header, $table, $field)
46
 function check_table_field($header, $table, $field)
42
 {
47
 {
43
   $headers = apache_request_headers();
48
   $headers = apache_request_headers();

Loading…
Cancel
Save