| | |
Question about cookies
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2005
Posts: 150
Reputation:
Solved Threads: 13
Are you sure? Normally, when using session_destroy() the cookie isn't deleted - you have to do it manually. Maybe, you can post your code here, so that people get an ideo of your problem.
•
•
Join Date: Apr 2009
Posts: 59
Reputation:
Solved Threads: 1
Yes, I am sure. I logged in, checked, and the cookie was there. I logged out, checked, and the cookie had been deleted. Here is my cookie script:
Here is my logout script:
Could it be because I am using isset to set the cookie possibly?
Well it's not the isset. Here is the revised code:
It's as if PHP is treating it as a session cookie.
php Syntax (Toggle Plain Text)
<?php if(isset($_SESSION['theme'])); $theme = $_SESSION['theme']; setcookie(theme,$theme,time()+(60*60*24*365)); ?>
php Syntax (Toggle Plain Text)
<? session_start(); if($_SESSION["uname"]<> "") { session_unset(); session_destroy(); header( "Location:index.php" ); exit(); } ?>
Well it's not the isset. Here is the revised code:
php Syntax (Toggle Plain Text)
<?php if($_SESSION['theme']); $theme = $_SESSION['theme']; setcookie(theme,$theme,time()+(60*60*24*365)); ?>
Last edited by Tekkno; Aug 17th, 2009 at 2:33 pm.
![]() |
Similar Threads
- Cookie or Session for shopping card (PHP)
- Log out page (PHP)
- DHTML pop up help (JavaScript / DHTML / AJAX)
- Cookies and JSP website (JSP)
- Is session will work if cookies are disbaled on clinet side? (PHP)
- when to use session and cookies variables ? (ASP)
- Cookies folder within Temp folder (Windows NT / 2000 / XP)
- Registry question (Windows Software)
- Changing Network Configuration (*nix Software)
Other Threads in the PHP Forum
- Previous Thread: mail from SMTP authentication script doesn't seem to work
- Next Thread: convert anyfile to html
| Thread Tools | Search this Thread |
advanced apache api array basics beginner binary broken cakephp check checkbox class cms code codingproblem combobox cookies cron curl database date datepart display dynamic echo email error file files folder form forms function functions google head href htaccess html image include includingmysecondfileinthechain insert ip javascript job joomla js limit link login mail menu mlm mobile multiple mysql oop outofmemmory paging parse password paypal pdf php problem procedure query radio ram random recursion remote script search server sessions smarty sms source space sql stored syntax system table traffic tutorial unicode up-to-date update upload url validator variable video web webapplications websitecontactform youtube





