> I've been working on part of a custom loggin tool for one 
> of my sites and have noticed that when a form has been 
> posted to a target which includes a query string in the 
> url, the query string is not available in the cgi variables 
> scope (cgi.querystring)
> 
> to demonstrate - try the code below
> 
> thispage.cfm
> ---------------
> 
> <form method=post action=thispage.cfm?query=success>
> <input type=submit value=submit>
> </form>
> 
> <cfif isdefined("form.submit")>
> <cfoutput>
> #cgi.query_string#
> </cfoutput>
> </cfif>
> 
> In theory this should return "query=success" when the button 
> has been pressed, but does not. This problem is hampering some 
> parts of my custom logging/monitoring application.

You're making a mistake in your assumption. In your code above, there will
never be a variable called "Form.submit". You'd have to give your submit
button a name to have it pass its value to the action page. You can easily
test this by putting some literal text in your CFIF test; you'll see that
the text never displays even after the form has been submitted.

Once you fix that HTML error, your code will in fact reference
CGI.QUERY_STRING correctly.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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

Reply via email to