Wednesday, October 13, 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:



OGM To MP4



HR HR In The Eyes Of Men And Women



Managed and leased operators should pay attention to The problems and suggestions



Infomation Dictionaries Education



VBScript ReDim Statement



mjpeg to epson Encoder



Why Do We Need SAS?



ASF Converter



Audio files, search the earthquake it was thousand clues



Xi'an: A6 experiential training shock city



Evaluate BUSINESS Databases And Tools



ASF to MOV



Taiwan 3G competition for business Opportunities in the Mainland 300 000 000 000



Ma: I May A Little Crazy But Not Stupid



No comments:

Post a Comment