This is a little code example that will validate an email address in two ways: - first the general syntax of the string is checked with a regular expression - then the domain substring (after the '@') is checked using the 'checkdnsrr' function function validate_email ( $email ){ $exp = "^[a-z\'0-9]+([._-][a-z\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$" ; if( eregi ( $exp , $email )){ if( checkdnsrr ( array_pop ( explode ( "@" , $email )), "MX" )){ return true ; }else{ return false ; } }else{ return false ; } } ?>
If changing port number doesn't solve your problem, follow steps and this solves problem: (** By these steps don't need to reinstall Xampp or loss your database**) Stop all Xampp services and exit application. Move to c:\xampp\mysql Rename data folder to data_old create new data folder and copy whole content of backup folder to the data folder except "ibdata1" 5) Select all files in data_old folder and paste into data folder ( Note Don't replace copied files and skip replace theme).
Comments