id = saferequest ("id")
Sql= "Delete from table1 where whereid>" &id& "
Rs.Open sql,conn,1,3
Response.Write "<script>alert (' delete success '); location.href= ' del.asp ';</script>"
Set rs=nothing
Set Conn=nothing
' This is the filter illegal character function
function Saferequest (paraname)
Dim paravalue
Paravalue=request (Paraname)
If IsNumeric (paravalue) = True Then
Saferequest=paravalue
Exit function
ElseIf InStr (LCase (Paravalue), "select") > 0 or InStr (LCase (Paravalue), "Insert") > 0 or InStr (LCase (Paravalue), "de Lete from ") > 0 or InStr (LCase (Paravalue)," Count (") > 0 or InStr (LCase (Paravalue)," drop table ") > 0 or InStr (Lcas E (Paravalue), "Update") > 0 or InStr (LCase (Paravalue), "truncate") > 0 or InStr (LCase (Paravalue), "ASC (") > 0 or I Nstr (LCase (Paravalue), "Mid (") > 0 or InStr (LCase (Paravalue), "char (") > 0 or InStr (LCase (Paravalue), "xp_cmdshell" ) > 0 or InStr (LCase (Paravalue), "exec master") > 0 or InStr (LCase (Paravalue), "net localgroup Administrators") > 0 or InStr (LCase (Paravalue), "and") > 0 or InStr (LCase (Paravalue), "NET user") > 0 or InStr (LCase (Paravalue), "or") > 0 or InStr (LCase (Paravalue), "" "" ") >0 or InStr (LCase (Paravalue)," ' ") >0 Then
Response.Write "Please do not add illegal characters to the function!" "
Response.End
Else
Saferequest=paravalue
End If
End Function