Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
PHP Server Side Scripting
5:21 am Jun 27, 2026
This page requires javascript.
Forum Moderators:
coopster
Message Too Old, No Replies
PHP - deleting cookie?
Crump
Msg#:1304534
8:59 pm on Mar 17, 2006
(gmt 0)
What is the best way to delete a cookie in PHP? By changing the expiration date to something in the past? or by setting the value to nothing ("")?
IamStang
Msg#:1304535
2:21 am on Mar 18, 2006
(gmt 0)
From what I have read on the subject, "changing the expiration date to something in the past" is the best method.
Mr_Fern
Msg#:1304536
10:21 am on Mar 18, 2006
(gmt 0)
stang's right. simply setting it to "" doesn't delete it, just gives it the value of empty string
coopster
Msg#:1304537
8:10 pm on Mar 18, 2006
(gmt 0)
Examples can be found in the PHP manual pages for
setcookie()
[php.net].
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
May
,
Apr
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
June 2026 Google Search Observations
AdSense Earnings and Observations - June 2026
Quite quiet in here, anyone know why?
Best Learning Path for a Web Development Beginner?
Buying traffic to appear on Google Discover
Home
Forums Index
Server Side
/
PHP Server Side Scripting
5:21 am Jun 27, 2026