Forum OpenACS Q&A: Response to Documentations that don't make sense

Collapse
Posted by Li-fan Chen on

I won't call it an undocumented feature, but I clearly overlooked the hard to find little documentation that describes the difference between having things filled in ns_getform only and having things filled in both [ns_conn query] and ns_getform. Can someone clear this out up?

# This is from tcl/ad-security.tcl's sec_security_read_info
            set query [ns_conn query]
            if { $query != "" } {
                set query "?$query"
                if { [ns_getform] != "" } {
                    set query "$query&[export_entire_form_as_url_vars]"
                }
            } elseif { [ns_getform] != "" } {
                set query "?[export_entire_form_as_url_vars]"
            }

So what sort of form can we build that goes only into [ns_conn query] or only into [ns_getform]'s ns_set? And then there's the ns_conn [form format] as well. When the form data arrives are these structures or strings filled with the same name=value items? Does POST and GET differenciate what goes where? How can I tell (I could telnet and try I guess hehe but I figure someone can point me to where it's pointed out in the docs)?