Türkiye'nin En Eski Webmaster Forumu İyinet'e Hoşgeldiniz!

PHP email adresinin kontrolü

MustafaYildiz

0
Onaylı Üye
Üye
Katılım
16 Haziran 2013
Mesajlar
1,250
Açılan Konu
547
Tepki puanı
1
Konum
İstanbul
PHP:
<?

function adreskontrolet ($adres) {
$sonuc = ereg("^[^@ ]+@[^@ ]+\.[^@ \.]+$", $adres,$kayit);
if ($sonuc) { $dogru = "Evet"; } else { $dogru = "Hayir"; }
echo ("e-mail adresiniz : $adres  $dogru <BR>");
}

adreskontrolet ("buadresdogrumucom");
adreskontrolet ("bu [email protected]");
adreskontrolet ("bu@[email protected]");
adreskontrolet ("[email protected]");
?>
 
Üst