README.md
December 5, 2022 ยท View on GitHub
Description
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.
More Info
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
| Submitted On | |
| By | Dean Kroon |
| Level | Intermediate |
| User Rating | 4.6 (37 globes from 8 users) |
| Compatibility | ASP (Active Server Pages) |
| Category | Miscellaneous |
| World | ASP / VbScript |
| Archive File |
Source 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