NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_queryexists(n) 4.99.30 naviserver "NaviServer Built-in Commands"

Name

ns_queryexists - Check for a key in the query data that was part of the HTTP request

Table Of Contents

Synopsis

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.

COMMANDS

ns_queryexists key

EXAMPLES

 ns_register_proc POST /queryexiststest queryexiststest
 
 proc queryexiststest { } {
  if [ns_queryexists name] {
    # process the form
  } else {
    ns_returnerror 400 "need to supply your name in the form"
  }
 }

See Also

ns_getform, ns_query, ns_querygetall

Keywords

form, query