I'm using the simple code below to verify an email address. However, the line that reads
If InStr(1, email, ".", 1) < 4 Then
returns emailOK = 1.
Is there a syntax problem? Seeing that I am looking for the character "." I am not sure if the 'compare' parameter of inStr() be 1 (textual comparison) or 0 (binary comparison)? Does it make a difference?
Dim emailOK
emailOK = 0
If Len(email) < 6 Then
emailOK = 1
End If
If InStr(1, email, "@", 1) < 2 Then
emailOK = 1
Else
If InStr(1, email, ".", 1) < 4 Then
emailOK = 1
End If
End If
If emailOK <> 0 then
response.write "Incorrect Email..."
End If
If InStr(1, email, ".", 1) < 4 Then
returns emailOK = 1.
Is there a syntax problem? Seeing that I am looking for the character "." I am not sure if the 'compare' parameter of inStr() be 1 (textual comparison) or 0 (binary comparison)? Does it make a difference?
Dim emailOK
emailOK = 0
If Len(email) < 6 Then
emailOK = 1
End If
If InStr(1, email, "@", 1) < 2 Then
emailOK = 1
Else
If InStr(1, email, ".", 1) < 4 Then
emailOK = 1
End If
End If
If emailOK <> 0 then
response.write "Incorrect Email..."
End If