Forum OpenACS Q&A: Re: Using GET and POST variables

Collapse
Posted by César Clavería on
OK, after some test I got a solution :).
A fairly simple solution.

It looks like AOLServer ignores the parameters in the query string if the method used was POST, but even then it is possible to obtain the query string using.

set query [ns_conn query]

and then parse it with:

set get_variables_set [ns_parsequery $query]

and finally we can get the variables value using the resulting ns_set

set getvar [ns_set get $get_variables_set "getvar"]

:D

Collapse
Posted by Ryan Gallimore on
Even so, it is much easier (and recommended) to use ad_form to build a form with OpenACS.
Collapse
Posted by Gustaf Neumann on
Ryan, this problem is independent of whether or not ad_form is used. It is a question, of what is specified in the action of a form. Btw, the class ConnectionContext in xotcl-core distinguishes as well between form parameters and query parameters for exactly the same reasons. There are situations, where a query is parameterized (via URL), which transmits a form via POST.
Collapse
Posted by César Clavería on
Thanks, good to know some other alternatives, I guess I have to learn xotcl.

My main problem with this was that the information was being sent trough a flash object, the flash object sends some information as POST, but I needed some more parameters so I sent them using GET. Thats why I came across this problem.