- <?
- function validate_email($email) {
- // Create the syntactical validation regular expression
- $regexp = "^([_a-z0-9-]+)(.[_a-z0-9-]+)*@([a-z0-9-]+)(.[a-z0-9-]+)*(.[a-z]{2,4})$";
- // Presume that the email is invalid
- $valid = 0;
- // Validate the syntax
- $valid = 1;
- $valid = 0;
- }
- }
- ?>
Code / PHP Snippets / Function: validate_email()
Download as Text : January 6th, 2009
This work is licensed under a