diff options
Diffstat (limited to 'includes/function.inc')
-rw-r--r-- | includes/function.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/function.inc b/includes/function.inc index 8a2a73604..fe792d43c 100644 --- a/includes/function.inc +++ b/includes/function.inc @@ -28,6 +28,14 @@ function check_code($message) { return $message; } +function check_mail($mail) { + return eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $mail) ? 1 : 0; +} + +function check_name($name) { + return ereg("[^a-zA-Z0-9_-]", $name) ? 0 : 1; +} + function check_output($message, $nl2br = 0) { global $allowed_html, $na; $var = strip_tags(stripslashes(format_text($message)), $allowed_html); |