Jump to content

Archived

This topic is now archived and is closed to further replies.

redarrow

valadate email address with eregi

Recommended Posts

Can you kindly tell me if the below code has any code speed diffrence in doing one example or the other cheers.


example 1
[code]
<?
echo"<br><br><br>";

$email="Anyemailaddress@anywere.com";

if(eregi("^.{1,25}@.{1,25}[./-].{1,3}$" , $email)) {

echo"Email address valid";

}else {

if(eregi("^.{1,25}.{1,25}[./-].{1,3}$" , $email)) {

echo"Email address not valid";
}
}
[/code]

example 2

[code]
<?
echo"<br><br><br>";

$email="Anyemailaddress@anywere.com";

if(eregi("^.{1,25}@.{1,25}[./-].{1,3}$" , $email)) {

echo"Email address valid";

}else {

echo"Email address not valid";
}

?>
[/code]

Share this post


Link to post
Share on other sites
if theres any difference at all it shouldnt be noticeable to be honest.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.