VarsFromForm
This subroutine creates a variable (on the fly) for each form item found on Request.Forms or Request.QueryString collections. The variable is given the same name as the form items name. It was built to duplicate some of PHPs built in functionality.
Original Author: Dean Kroon
Assumptions
Ex.
' this form lives in some asp or html page
' the user enters:
Dean Kroon
421 Blue Earth St
PO Box 123
' this code lives in doit.asp
<%
Call VarsFromForm
Response.write name & "
" & address1 & ", " & address2
%>
' The output looks like
Dean Kroon
421 Blue Earth St, PO Box 123
Code
public sub VarsFromForm
for each item in request.form
execute(item & "=""" & Replace(request.form(item), Chr(34), Chr(34) & Chr(34)) & """")
next
for each item in request.QueryString
execute(item & "=""" & Replace(request.QueryString(item), Chr(34), Chr(34) & Chr(34)) & """")
next
end sub
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.