Setcookie doenn't work
| From: | pete M | Date: | Fri, 24 Sep 2004 11:55:23 +0000 |
| Subject: | Setcookie doenn't work | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-197770@lists.php.net to get a copy of this message | ||
I've got this function in a class object, however the cookie does not set even though £ok returns true !!! I've got cookies enables on all my borswers (firefox, mozilla, opera , IE)..
any ideas !!
function updateClient($arr){
extract($arr);
//print_r($arr);
$sql = "update clients set
name= '$name',pos = '$pos',company= '$company',
address='$address',postcode ='$postcode',email='$email',tel='$tel',affiliate=$affiliate,aff_stat_id = $aff_stat_id ,
date_updated = now() , ip='$ip'
where client_id = $client_id
";
$this->query($sql);
$ok = setcookie("client_id", "argh", 259300); //* expire in a month ish
//echo $sql."=$client_id"."=$ok";
$_SESSION['client'] = $this->getClient($client_id);
return $client_id;
}