CRequest::getCookie
The CRequest::getCookie function retrieves the value of a cookie by its name.
chchar * getCookie(
chchar * cookieName // containing the name of the cookie
);
Return Type
chchar *
Upon successful completion, a string which contains the value of a cookie is returned. Otherwise, NULL is returned.
Parameters
cookieName
A string which contains the name of a cookie.
Remarks
This function retrieves the value of a cookie by its name. The CRequest::getCookies function can get all cookies. The CResponse::addCookie function adds a cookie to a client.
Differences Between Ch-CGI and Ch-ASP
In Ch-ASP, the cookies added by CResponse::addCookie can be retrieved by getCookie() or CRequest::getCookies in the same program. In Ch-CGI, the cookies added by CResponse::addCookie cannot be retrieved by getCookie() or CRequest::getCookies in the same program.
See Also
CRequest, CResponse::addCookie, CRequest::getCookies
Example