COOKIE function library: cookie. inc. php3 original author: unknown SyntaxHighlighter. all (); info & nbsp; | & nbsp; Security & nbsp; | & nbsp
COOKIE function library: cookie. inc. php3
If (! Isset ($ __cookie_inc __)){
$ __Cookie_inc __= 1;
Function JsSetCookie ($ CName, $ CValue, $ CExpr = FALSE ){
// This function allows you to set the cookie after the HTML header is marked,
// Can be supplemented or even replaced by the SetCookie function.
// $ CName...: cookie name
// $ CValue...: cookie value
// $ CEXpr...: the cookie's validity period, in minutes. you can also modify the number of hours and days.
If ($ CExpr> 0 ){
$ CookieString = "astr = '$ cname' +' = '+' $ cvalue' + '; expires =' + expr + '; path = /';";
$ Cookie. = "nn ";
} Else {
$ Cookie. = "n
$ Cookie. = "document. cookie = '$ CName = $ CValue; path = /';";
$ Cookie. = "n script n ";
}
Echo $ Cookie;
}
}
?>
Original Author: unknown