Need help checking cookies
Posted: Mon Jun 06, 2005 7:08 am
I was wondering if anyone could tell me how to check if a cookie exits. I have tried to do it with the following:
but with no success (php4), can anyone help?
JCART | Please use
Code: Select all
if(!$_COOKIE[($this->sitedata['cookie']).'user']) {
setcookie (($this->sitedata['cookie']).'user', $this->sitedata['dbuser']);
}
if(!$_COOKIE[($this->sitedata['cookie']).'pass']) {
setcookie (($this->sitedata['cookie']).'user', $this->sitedata['dbpass']);
}
// Check if the cookie has been created
echo $_COOKIE[($this->sitedata['cookie']).'user'];
echo $_COOKIE[($this->sitedata['cookie']).'pass'];JCART | Please use
Code: Select all
tags when posting php code. Review [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color][/size]