Hi guys, im fairly new to php and mysql.
Im basically trying to record the date/timestamp that the user clicks on a certain link and record it in a field in my table in my database.
Thanks for any help...
if(isset($_COOKIE['visittime']))
{
echo 'Welcome back!<br>';
$timeElapsed = date("F j, Y, g:i a");
$_COOKIE['visittime'] = $timeElapsed;
echo 'Last accessed ' . $timeElapsed. '' ;
}
else
{
echo 'I see you are new here';
}
//Set the current time as a cookie and make it expire much later.
$nextYear = time() + (60 * 60 * 24 * 365);
setcookie('visittime', time(), $nextYear);
Recording php Cookie to mySql DB
Moderator: General Moderators
-
youngdeveloper
- Forum Newbie
- Posts: 1
- Joined: Wed Oct 15, 2008 11:03 am