|
-
Oct 31st, 2012, 06:54 AM
#1
Thread Starter
Junior Member
[RESOLVED] HELP needed for php storing date-time cookie and display
hi
i have written this code for creating a php to store current date and time in a cookie and diaplay last visited on
while i compile i get an error as "parse error:syntax error,unexpected ':' in D:\documents\d.php on line 3
<?php
$inTwoMonths = 60 * 60 * 24 * 60 + time();
setcookie(‘lastVisit’, date(“G:i – m/d/y”), $inTwoMonths);
if(isset($_COOKIE['lastVisit'])) {
$visit = $_COOKIE['lastVisit'];
echo “Your last visit was – “. $visit;
}
else
echo “You’ve got some stale cookies!”;
?>
please can anyone help me in correcting this code pllzzz
any help would be appreciated
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|