#native_company# #native_desc#
#native_cta#

Check Email Validity

By Sanjeev Ram Vaidya
on May 22, 2001

Version: php3

Type: Full Script

Category: HTTP

License: Other

Description: It will check weather the entered email address is in correct manner or not.

<?
function disp_header()
{
global $PHP_SELF;
?>
<form method=post action=<?echo$PHP_SELF?>>
<input type=hidden name=sub value="ok">
Enter Email address <br>
<input type=text name=EMAIL size="20" value=<?echo$EMAIL?>>
&nbsp;
<input type=submit name=submit value=Check>
</form>
<?
}

if (empty($sub))
{
	disp_header();
}
elseif ($sub == "ok")
{
	$CHECK= strstr ($EMAIL, '@');
	$CHECK1= strstr ($CHECK, '.');
	print "$Foul<br>n";
if ( ( ereg( "([~!#$%^&*])", $EMAIL)) || (!$CHECK) || ($CHECK == "@") ||
(!$CHECK1) )
	{
	print "$EMAIL not valid Email Addressn"."<br>n";
	}
	else
	{
	Print "valid email address $EMAIL";
	}           
}
?>