hey!
to make a cookie you want to run this. btw the +3600 is time measured in seconds i think.
Code:
setcookie("name", "value", time()+3600);
to expire a cookie
Code:
setcookie("name", "value", time()-3600);
one thing you will need to do is verify that the person has a valid cookie. so once they are logged in you will want to check that their cookie is still active. for example a person did not type in the address of secure pages.
Code:
//cookie validation
$valid_check = $_COOKIE['name'];
if($valid_check == "value")
{
// Login OK
}else{
// Login FAKE
header("Location: ../index.php");
}
Bookmarks