CGIParameterName()

Syntax

Result = CGIParameterName(Index)
Description
Returns the name of the specified parameter.

Parameters

Index The index of the parameter to get the name. The first index value starts from 0. To get the number of available parameters, use CountCGIParameters().

Return value

Returns the name of the specified parameter.

Example

  If Not InitCGI() Or Not ReadCGI()
    End
  EndIf
  
  WriteCGIHeader(#PB_CGI_HeaderContentType, "text/html", #PB_CGI_LastHeader) ; Write the headers to inform the browser of the content format
  
  WriteCGIString("<html><title>PureBasic - parameters</title><body>" +
                 "NbParameters: " + CountCGIParameters() + "<br><br>")
  
  ; List the all parameters and display their name
  ;
  For k = 0 To CountCGIParameters()-1 
    WriteCGIString(CGIParameterName(k)+"<br>")
  Next
  
  WriteCGIString("</body></html>")

See Also

CountCGIParameters(), CGIParameterValue(), CGIParameterType()

Supported OS

All

<- CGIParameterDataSize() - CGI Index - CGIParameterType() ->