PHPsu
MANUAL ZH  |  EN
     


Current Position :| index>FAQ> PHP how to use cookies?

PHP how to use cookies?

FROM: AUTHOR: TIME:2008-05-17 HITS:
PHP how to use cookies? 


setcookie("cookie_name", $ccdotvalues, time() + (3600*24*30)); 
echo $_COOKIE["cookie_name"];


Or use Set-Cookie header output can also be created.

Clear time:

setCookie('cookie_name'); //cookies expired or to change to the present day

TITLE:PHP how to use cookies?
Copyright 2008 The PHPsu All rights reserved. This mirror generously provided by: .Hp Inc.
Last updated: Fri Jun 6 22:58:41 GMT-8 2008