Jump to content

valadate email address with eregi


redarrow

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="[email protected]";

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="[email protected]";

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

echo"Email address valid";

}else {

echo"Email address not valid";
}

?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/6642-valadate-email-address-with-eregi/
Share on other sites

Archived

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

×
×
  • Create New...

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.