XAMPP don't remember cookies
Posted: Tue Jan 11, 2011 7:56 pm
I am using php on xampp locally.
I have created a script
it runs properly on the browser, no error.
except it will only give me no cookie, no matter how many times i close and reopen the browser to this script.
Thank you!
I have created a script
Code: Select all
<?php
$inTwoMonths = 60 * 60 * 24 * 60 + time();
setcookie('lastVisit', date("G:i - m/d/y"), $inTwoMonths);
if (isset($_COOKIE['lastvisit']))
$visit=$_COOKIE['lastvisit'];
else
echo "no cookie yet, come back later </br>";
?>except it will only give me no cookie, no matter how many times i close and reopen the browser to this script.
Thank you!