elseif ($email == '') {
echo 'You must select enter an email address';
}
elseif ($email !=eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($email))) {
echo 'You must enter a valid email address format';
}
ASKER
ASKER
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.
TRUSTED BY
Open in new window
Checks if $email is equal to the return of the function which would be: Returns the length of the matched string if a match for pattern was found in string, or FALSE if no matches were found or an error occurred. So you probably just want the function in there. Also you can use filter_var for to make this easier:
Open in new window