InStr Problem
Er ved at lave en ban funktion til mit tagwall. Men når jeg prøver at bruge InStr til søge i database-field'et "IP" får jeg Execetion Occured Linje 66.Nogen der kan hjælpe, og se fejlen?:
If InStr(1,Ban("IP"),Request.ServerVariables("REMOTE_ADDR"),1) > 0 Then 'Linje 66
Response.Write "<h2>Du kan ikke skrive i vores tagwall, da du er bannet.<br>Mener du dette er en fejl, tager du grueligt fejl.</h2>"
Else
If Len(xtag) < 300 Then
xtag = Replace(xtag, "'", "'")
xtag = Replace(xtag,"<","<")
xtag = Replace(xtag,">",">")
xnavn = Replace(xnavn,"'","''")
xnavn = Replace(xnavn,"<","<")
xnavn = Replace(xnavn,">",">")
xtag = Trim(Replace(xtag, vbCrLf, "<br>"))
strSQL = "Insert into tagwall("
strSQL = strSQL & "navn, "
strSQL = strSQL & "tag, "
strSQL = strSQL & "farve, "
strSQL = strSQL & "tid, "
strSQL = strSQL & "ip) "
strSQL = strSQL & "values("
strSQL = strSQL & "'" & xnavn & "', "
strSQL = strSQL & "'" & xtag & "', "
strSQL = strSQL & "'#E4BC2E', "
strSQL = strSQL & "'" & xtime & "', "
strSQL = strSQL & "'" & xip & "')"
Else
Response.Write "Du må kun skrive 300 tegn af gangen."
End If
End If
