I have this script I'm working on to study the way cookies work; but I have no idea why it does not create a cookie on my machine ???
<?php
if (!isset($_COOKIE['TestCookie'])) {
setcookie("TestCookie", $_POST['TestCookie'], time()+3600) ;
setcookie("visits", 1) ;
echo "Hello !" . $_POST['TestCookie']. "<br />" ;
echo "It appears that this is your first visit!" ;
} else {
setcookie("visits", ++$_COOKIE['visits']) ;
echo "Welcome back," . $_COOKIE[TestCookie] . "<br />" ;
echo "You have visited us " .$_COOKIE[visits]. " times!" ;
}
?>
any help would be great !
--------------------------------------
"Hacker by Heart"
saenzcorp@hotpop.com
<?php
if (!isset($_COOKIE['TestCookie'])) {
setcookie("TestCookie", $_POST['TestCookie'], time()+3600) ;
setcookie("visits", 1) ;
echo "Hello !" . $_POST['TestCookie']. "<br />" ;
echo "It appears that this is your first visit!" ;
} else {
setcookie("visits", ++$_COOKIE['visits']) ;
echo "Welcome back," . $_COOKIE[TestCookie] . "<br />" ;
echo "You have visited us " .$_COOKIE[visits]. " times!" ;
}
?>
any help would be great !
--------------------------------------
"Hacker by Heart"
saenzcorp@hotpop.com