PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
ol4pr0
Forum Regular
Posts: 926 Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador
Post
by ol4pr0 » Thu Sep 02, 2004 3:37 am
i have read the pervious post about the sessions that couldnt be destroyed.
i have php 5 installed at home and php 4 installed on the server both give me the same problem
Code: Select all
<?
session_start();
$_SESSION = array();
session_destroy();
session_unset("x");
session_unset("y");
session_unset("z");
?>
Tried them almost all i think. however they are not being destoyed or unset. Only a closing browser will unset them.
duk
Forum Contributor
Posts: 199 Joined: Wed May 19, 2004 8:45 am
Location: London
Post
by duk » Thu Sep 02, 2004 7:27 am
just
Code: Select all
<?php
session_start();
session_unset();
?>
will not unset all variables ????
i use this and unset all variables...
anjanesh
DevNet Resident
Posts: 1679 Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India
Post
by anjanesh » Thu Sep 02, 2004 8:21 am
Had same problem before.
This fixed it though
Code: Select all
session_unset();
$_SESSION = array();
session_destroy();
setcookie(session_name(),"",0,"/");
ol4pr0
Forum Regular
Posts: 926 Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador
Post
by ol4pr0 » Thu Sep 02, 2004 12:59 pm
Thanks that most certenly did it lol