Hello again.
I am trying to make a button to clear all cookies (partner_id primery).
i used this code in a blank module (PHP enabled):
function deleteCookies()
{
if (isset($_SERVER)) {
$cookies = explode(';', $_SERVER);
foreach($cookies as $cookie) {
$parts = explode('=', $cookie);
$name = trim($parts[0]);
setcookie($name, '', time()-1000);
setcookie($name, '', time()-1000, '/');
}
}
echo '<script type="text/javascript">';
echo 'alert("Cookies Deleted!")';
echo '</script>';
}
echo '<input type="button" onClick="'.deleteCookies().'" value="Clear Cookie" /><br>';
but when i am runing it, it does not clear the most importent cookie, the partner_id..
So i am asking, can something close to this can be done to clear the partner_id cookie?
thanks alot.