Cookies
Cookies
Setcookie() function
Int setcookie(string name, string value, int expire, string path, string domain,
int secure);
Notes: it same with header()
Setcookie(“TestCookie”,$value,time()+3600,”/~jollen/”,”.o3.net”,1);
Setcookie(“username”, “Jollen”, time()+3600);
If(isset($UserName))
Setcookie(“UserName”); //delete cookie
Session
Step 1
Session_start();
Step 2
Session_register(“userID”);
Step 3
Session_destroy();