| Here is a Simple PHP function to check valid Email Addresses. The function accepts Email string trims it check whether it satisfies the Email format. if it satisfies then return TRUE else FALSE. Scroll down for the function. | |
| function validateEmail( $strEmail ){ $strEmail=trim($strEmail); if( $strEmail!="" ){ $pattern="/^([a-z0-9_\.]+)@([a-z0-9_\-\.]+)\.([a-z]{2,3})$/i"; if( preg_match($pattern,$strEmail,$match) ){ return TRUE; }else FALSE; }else return TRUE; } How to use this function? $myEmail=$_POST['txt_email']; if validateEmail( $myEmail ) echo("VALID EMAIL"); else echo("YOU ENTERED AN INVALID EMAIL."); Hope thi shelp someone... :) | |
Deep-sea Anglerfish are the strange and elusive creature that are very rarely observed in their natural habitat. Fewer than half a dozen have ever been captured on film or video by deep-diving research vehicles.They are mostly found in tropical to temperate waters of the Indian,Pacific and Atlantic Oceans.

Comments
Post a Comment