Difference between revisions of "Ns queryexists"
Jump to navigation
Jump to search
(imported from WiKit id 621) |
|||
| Line 36: | Line 36: | ||
---- | ---- | ||
| − | [[Category Documentation]] - [[Category Core Tcl API]] | + | [[Category:Documentation]] - [[Category:Core Tcl API]] |
Latest revision as of 19:08, 7 February 2009
Man page: http://aolserver.com/docs/tcl/ns_queryexists.html
NAME
- ns_queryexists - Check for a key in the query data that was part of the HTTP request
SYNOPSIS
- ns_queryexists key
DESCRIPTION
- This command looks in the query data for the specified key. If the key exists, 1 is returned; otherwise 0 is returned. The key is interpreted in a case-insensitive manner.
EXAMPLES
ns_register_proc POST /queryexiststest queryexiststest
proc queryexiststest { } {
if {ns_queryexists name} {
# ...process the form...
} else {
ns_returnerror 400 "you need to supply your name in the form"
}
} ;# queryexiststest
NOTES
- Note that despite it's name, ns_queryexists works on POST form data as well as query string data.
SEE ALSO
-