note 49974 rejected from function.parse-url by nlopess

From: Date: Mon, 14 Feb 2005 17:12:52 +0000
Subject: note 49974 rejected from function.parse-url by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-85020@lists.php.net to get a copy of this message
Note Submitter: servdezigner at hotmail dot com ---- Can't Set Cookie and Delete Cookie . /******************* remcookie ***********************/ if($_POST['remcookie']=='yes'){ //if ($auto_login == 1) { $parts = parse_url($_base_href); //setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]] ) $cookie_expire = time()+432000; setcookie('serv_cookie_login', $username, $cookie_expire, $parts[path], $parts[host], 0); setcookie('serv_cookie_pass', $password_db, $cookie_expire, $parts[path], $parts[host], 0); echo $_POST['remcookie']; // } }else{ /* delete cookie*/ //setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".example.com", 1); setcookie('serv_cookie_login','',time() - 3600, $parts[path], $parts[host], 1); setcookie('serv_cookie_pass','',time() - 3600, $parts[path], $parts[host], 1); echo 'NO Rem Cookie'; } /******************* end remcookie ***********************/ How to? ..

« previous php.notes (#85020) next »