[PHP] Setcookie doenn't work
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; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setcookie doenn't work
$ok = setcookie(client_id, argh, 259300); //* expire in a month ish Nope, it expired a long time ago... :-) Read the manual for setcookie: http://php.libero.it/manual/en/function.setcookie.php (mainly the part about the expire parameter) HTH, cheers Silvio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setcookie doenn't work
doh!! ta ;-) S ilvio Porcellana wrote: $ok = setcookie(client_id, argh, 259300); //* expire in a month ish Nope, it expired a long time ago... :-) Read the manual for setcookie: http://php.libero.it/manual/en/function.setcookie.php (mainly the part about the expire parameter) HTH, cheers Silvio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php