function | The solution function is very simple, mainly for strings and numbers of two types of incoming data processing, specific use:
of the character type
strUserName = Checkinput (Request ("username"), "s")
of numeric types
id = checkinput (Request ("id"), "I"
Here is the function
Function Checkinput (Str,strtype)
' Function function: Filter single quotation marks in character arguments, judge numeric parameters, and assign 0 if not a numeric type
' parameter meaning: str----The parameters to be filtered
' strtype----parameter types, divided into characters and numbers, character "s" and "I" in digital form.
Dim strtmp
strtmp = ""
If strtype = "s" Then
strtmp = Replace (Trim (str), "'", "" ")
ElseIf strtype= "I" Then
If isnumeric (str) =false Then str= "0"
strtmp = str
Else
strtmp = str
End If
Checkinput = strtmp
End Function