Jump to content


Photo

Deleting Cookies


  • Please log in to reply
1 reply to this topic

#1 DragonFire-N[R]

DragonFire-N[R]
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 08 March 2006 - 05:45 AM

I have managed to delete cookies from some browsers like so:

setcookie( 'cookie', '-1', '1' );

However, for other browsers this method does not work. With that being said, I have a simple question: Can someone provide me with a function or method to completely remove a cookie? I'd be very grateful :)

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 08 March 2006 - 06:17 AM

This is the only example can find but in javascript.

// this deletes the cookie when called
function Delete_Cookie( name, path, domain ) {
if ( Get_Cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users