note 19090 added to function.strstr
| From: | cladiniz at zipmail dot com dot br | Date: | Fri, 15 Feb 2002 13:31:03 +0000 |
| Subject: | note 19090 added to function.strstr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26644@lists.php.net to get a copy of this message | ||
You can use strstr to make a simple e-mail verification , like this :
function checkEmail ($email){
// Check to see if E-mail contains "@" or "."
if (!strstr($email, "@") or !strstr($email, ".")) {
$check = "Error in E-Mail";
}else{
$check = "E-Mail OK !";
}
return $check;
}
--
http://www.php.net/manual/en/function.strstr.php
http://master.php.net/manage/user-notes.php?action=edit+19090
http://master.php.net/manage/user-notes.php?action=delete+19090
http://master.php.net/manage/user-notes.php?action=reject+19090