Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ok, now for Cookies ?

Status
Not open for further replies.

maverick

MIS
Apr 21, 1999
193
US
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
 
figured it out...

thanks guys !

--------------------------------------
"Hacker by Heart"
saenzcorp@hotpop.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top