ฟังก์ชั่น Validate Email PHP

ใช้ Regular Expression ช่วยครับ

code

function validateEmail($email){
 return eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$',$email);
}

Example

if(validateEmail("youmail@memo8.com")){

   echo"ถูกค้าบบบ";

}else{

   echo"ผิดว๊อยยย";

}
You can leave a response, or trackback from your own site. Responses are currently closed, but you can trackback from your own site. You can skip to the end and leave a response. Pinging is currently not allowed. Both comments and pings are currently closed.
Powered by WordPress | Shop Free T-Mobile Phones Online | Thanks to Verizon Phones without Contract, MMORPG Games and Sell Car