Nice, meaty answer. Thanks.
Is this a decent way to output them, or is there something more
elegant that skips the array conversion? (I'm not terribly familiar
with structures yet.)
<cfscript>
aryCGI = StructKeyArray(cgi);
for (i=1; i LTE arrayLen(aryCGI); i=i+1) {
cgiKey = aryCGI[i];
cgiVal = evaluate(aryCGI[i]);
if (len(cgiVal)) {
writeoutput(cgiKey & '=' & cgiVal & '<br>');
}
}
</cfscript>
Thanks,
Jamie
On Mon, 04 Feb 2002 17:48:33 -0500, in cf-talk you wrote:
>Yes (see notes for more)
>
>1. All CGI variables that exist are stored in a structure called CGI.
>2. A len() should be used to determine if a CGI variable exists because
(for
> some reason) it will ALWAYS exist. You can test this by outputting the
> following:
><CFOUTPUT>
>#cgi.thisisafakevar# - #len(cgi.thisisafakevar)#
></CFOUTPUT>
>3. you can see a 'true' list of CGI variables by using this code:
><CFLOOP collection="#cgi#" item="i">
><CFOUTPUT>#i# #cgi[i]#</cfoutput><BR>
></cfloop>
>
>At 05:40 PM 2/4/02, you wrote:
>>True or False?
>>
>>ALL CGI variables are ALWAYS "defined" within CF, so you test for them
>>using len() instead of isdefined().
>>
>>I want to be 100% certain that I don't need to use isdefined() for
>>them.
>>
>>Thanks,
>>Jamie
>>
>>
>
______________________________________________________________________
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists