Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sql_safe($value)
- {
- // Stripslashes
- if (get_magic_quotes_gpc())
- {
- $value = stripslashes($value);
- }
- // Clean if not integer
- if (!is_numeric($value) || $value[0] == '0')
- {
- $value = mysql_real_escape_string($value);
- }
- return $value;
- }
Add Comment
Please, Sign In to add comment