Fixe mysql error where mysql_real_escape_string and email validity checking