Navigation

  • index
  • next |
  • previous |
  • Sculptor Reference Guide 6.3.10 documentation »
  • The Sculptor language »
  • Functions »
  • Internet functions »
  • Storing the value of a cookie

Storing the value of a cookie¶

get_cookie_value()

Store the value of a cookie


SYNTAX

get_cookie_value(cookie_name, field_id)

Store the value of the specified cookie into the specified field. The value is converted to the type of field_id.

The function returns 0 (OK), or a negative value to indicate an error. The only possible error for this function is WWW_ERR_GENERAL (cookie name not found).

Note

  • The read_cookie_values() function stores the values of all cookies placed on the user’s machine by this server.


New in version 6.3.0: See the new features.

The character conversion honors the value set in sys.CharSetEncodeFrom and sys.CharSetEncodeTo, so that the string received is supposed to be sys.CharSetEncodeTo encoded while the result is converted into the sys.CharSetEncodeFrom encoding.


EXAMPLE

!temp RetVal,,i4

     tmp.RetVal = get_cookie_value("CHK_COOKIE", value)

RELATED TOPICS

Creating web pages with Sculptor

Internet functions

Internet function error codes

sys.CharSetEncodeFrom and sys.CharSetEncodeTo

Previous topic

Retreiving names of received cookies

Next topic

Save the web request content

Quick search

Navigation

  • index
  • next |
  • previous |
  • Sculptor Reference Guide 6.3.10 documentation »
  • The Sculptor language »
  • Functions »
  • Internet functions »
  • Storing the value of a cookie
© Copyright 2022, Sculptor Ltd..