[ Table Of Contents | Keyword Index ]

ns_queryexists(n) 4.99 "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

    TABLE OF CONTENTS
    SYNOPSIS
    DESCRIPTION
    COMMANDS
    EXAMPLES

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.

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"
  }
}