<?php
function validate($mail){
if(strpos($mail,"@")>0 && strpos($mail,".")>0)
{
$atPos= strrpos($mail,"@");
$dotPos=strrpos($mail,".");
$len=strlen($mail);
if($dotPos>$atPos && strrpos($mail,".")<= $len-2){
return true;
}
else
return false;
}
else
return false;
}
?>
function validate($mail){
if(strpos($mail,"@")>0 && strpos($mail,".")>0)
{
$atPos= strrpos($mail,"@");
$dotPos=strrpos($mail,".");
$len=strlen($mail);
if($dotPos>$atPos && strrpos($mail,".")<= $len-2){
return true;
}
else
return false;
}
else
return false;
}
?>
No comments:
Post a Comment