Saturday, September 25, 2010

ASP test two simple functions external to submit


This article cites two simple test ASP-function external to submit examples of the first function is ChkPost (), it can detect whether the server name where the user is currently present in the source page, the second function is PostCheck (), it can Through a simple test to see whether the POST form submission.

Function ChkPost ()
Detect the user currently exists in the server name where the source of the page

Code is as follows: Function ChkPost ()

dim server_v1, server_v2
chkpost = False
server_v1 = Cstr (Request.ServerVariables ("HTTP_REFERER"))
server_v2 = Cstr (Request.ServerVariables ("SERVER_NAME"))
If Mid (server_v1, 8, Len (server_v2)) <> server_v2 Then
chkpost = False
Else
chkpost = True
End If
End function

Function PostCheck ()
Very simple test is to test whether the POST method to submit

Code is as follows: Function PostCheck ()

PostCheck = False
If Lcase (Request.ServerVariables ("Request_Method "))=" post" Then PostCheck = True
End Function






Recommended links:



YouTube to WMV



Registry combat Collection - "Operation" Change Collection



Wizard Languages Education



Good Pager Tools



FLV To PSP



Sony and NEC will merge the two departments



My favorite Firewall And Proxy Servers



The table border css syntax order



Forgot Win XP to resolve password problems



WATERPROOF Wall - terminology to explain



Beijing Matsushita employee dissatisfaction compensation FOR loss of containment of the company



"Cockroaches door", HP will lose?



from the pornographic see COMPUTER security



DivX to 3GP



The pressure of free memory



Guide Audio Speech



No comments:

Post a Comment