Thursday, September 23, 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:



Easy Audio CD Players



QT to WMV



SWF to MOV



ICBC Amendment



Lists E-Commerce



Rising harm the user did not apologize for doing odd tiger, said to be practical



Alternative To Microsoft Office Word 39 S Tools



Photoshop font effects - waffle words



Used to create AUTOMATIC play music listening Pros CD



What is the trend of digital cameras



FreeBSD Serial (35): serial port and modem



FLV to iPhone



CEO Online: Yan Huang Star CEO Chang On August 15 Guest Sina



Directory Cartoons - Screen Savers



Visual Studio 2010 Will Be Formally Included F #



No comments:

Post a Comment