Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 11-06-2004, 02:44 PM   #1 (permalink)
falsepride
Regular Contributor
 
Join Date: Oct 2004
Posts: 209
falsepride is on a distinguished road
deleting cookies

whats the best way to delete a cookie in php? ive seen some page that said if you set a cookie with a negative time or something, that itll delete right away, or something but i can't remember
falsepride is offline   Reply With Quote
Old 11-07-2004, 08:42 AM   #2 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
Yes, setting a cookie with a time that is less than the current time should do the trick.

http://us2.php.net/manual/en/function.setcookie.php

See example two where it sets the cookie to one hour in the past to effectively tell the browser to remove it.

-r
idx is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cookies... buchannon HTML, XML, Javascript, AJAX 17 11-06-2004 07:45 AM
Cookies Problems rdove Feedback 2 02-17-2003 07:29 PM


All times are GMT -8. The time now is 09:21 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting