begin process at 2008 08 30 16:36:55
1 234 107 membres
140 nouveaux aujourd'hui
14 294 membres club

Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

VALIDER UNE ADRESSE EMAIL


Information sur la source

Catégorie :Administration Niveau : Débutant Date de création : 29/05/2002 Date de mise à jour : 29/05/2002 18:31:42 Vu : 3 052

Note :
Aucune note

Commentaire sur cette source (0)
Ajouter un commentaire et/ou une note

Description

A insérer dans la page du formulaire ou votre victime saisira son email

Source

  • <%
  • str0 = Request.Form("adressemail")
  • str1 = Replace(str0,";",".")
  • str2 = Replace(str1,"^","")
  • str3 = Replace(str2," ","")
  • str4 = Replace(str3,"é","e")
  • str5 = Replace(str4,"è","e")
  • str6 = Replace(str5,"à","a")
  • str7 = Replace(str6,"ù","u")
  • str8 = Replace(str7,"ç","c")
  • Function IsValidEmail( ByVal sString)
  • Dim sEmail, nIndex, nDotIndex
  • IsValidEmail = False
  • sString = Trim(sString)
  • nIndex = InStr(1, sString, "@")
  • If nIndex < 2 Then
  • Exit Function
  • End If
  • nDotIndex = InStrRev(sString, "." )
  • If nDotIndex < nIndex + 1 Then
  • Exit Function
  • End If
  • If InStr( nIndex + 1, sString, "@" ) > nIndex Then
  • Exit Function
  • End If
  • If nDotIndex > Len( sString ) - 2 Then
  • Exit Function
  • End If
  • IsValidEmail = True
  • End Function
  • If IsValidEmail(str8) = True Then
  • response.write("Adresse Ok")
  • response.write("<BR>")
  • response.write str8
  • else
  • response.write("Adresse invalide")
  • response.write("<BR>")
  • response.write Request.Form("adressemail")
  • End If
  • %>
<%
str0 = Request.Form("adressemail")
str1 = Replace(str0,";",".")
str2 = Replace(str1,"^","")
str3 = Replace(str2," ","")
str4 = Replace(str3,"é","e")
str5 = Replace(str4,"è","e")
str6 = Replace(str5,"à","a")
str7 = Replace(str6,"ù","u")
str8 = Replace(str7,"ç","c")

Function IsValidEmail( ByVal sString)
Dim sEmail, nIndex, nDotIndex
IsValidEmail = False
sString = Trim(sString)
nIndex = InStr(1, sString, "@")
If nIndex < 2 Then 
Exit Function
End If
nDotIndex = InStrRev(sString, "." )
If nDotIndex < nIndex + 1 Then
Exit Function
End If
If InStr( nIndex + 1, sString, "@" ) > nIndex Then
Exit Function
End If
If nDotIndex > Len( sString ) - 2 Then
Exit Function
End If
IsValidEmail = True
End Function

If IsValidEmail(str8) = True Then
response.write("Adresse Ok")
response.write("<BR>")
response.write str8
else
response.write("Adresse invalide")
response.write("<BR>")
response.write Request.Form("adressemail")
End If
%>
    Aucun commentaire pour le moment.

Ajouter un commentaire

Pub



Appels d'offres

Recherche developpeur ...
Budget : 700€
SITE MARCHAND LOCATION...
Budget : 3 000€
SITE MARCHAND POUR HOTEL
Budget : 4 000€

CalendriCode

Août 2008
LMMJVSD
    123
45678910
11121314151617
18192021222324
25262728293031

Boutique

Boutique de goodies CodeS-SourceS