Php > Cookies
Function that allows a Javascript cookie to be set after HTML has been
Function that allows a Javascript cookie to be set after HTML has been outputted to the page. function JSSetCookie($CName,$CValue,$CExpr=FALSE){ // $CName is the name of the cookie // $CValue is the value to be stored in the cookie // $CXpr is in years // This function will allow cookies to be set even after // HTML has been printed on the page. It is a supplement to the // SetCookie function when you have to output text before a cookie is set. if($CExpr!=FALSE){ $CookieString="astr= '$CName' + '=' + '$CValue' + ';expires=' + expr + ';path=/';"; $Cookie.="\n\n"; }else{ $Cookie.="\n\n"; } echo $Cookie; }
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage