Linked Questions

32 votes
2 answers
166k views

Possible Duplicate: What is the difference between session_unset() and session_destroy() in PHP? What is the best for security, and if the session is unset are load times better the next time the ...
Basic's user avatar
  • 1,866
1 vote
2 answers
2k views

?php session_start(); if(isset($_SESSION["user_name"])) if($_GET["destroy"]=="yes") { session_destroy(); unset($_SESSION["user_name"]); } if(!isset($_SESSION["user_name"]) && $_GET["user"]!="...
Ham Dlink's user avatar
69 votes
9 answers
307k views

I'm a noob programmer so I apologies in advance for any obvious mistakes. I've spent the past week creating a product database kinda thing. I've got too the point where I can add products using a form,...
bbowesbo's user avatar
  • 925
1 vote
1 answer
7k views

I have searched many questions regarding session_destroy and the often response from the answerers involve quoting directly from the PHP manual which states the following: session_destroy() destroys ...
Question Overflow's user avatar
2 votes
4 answers
2k views

I am new to learning Php. I have created the following code. <?php /* * Testing Sessions with PHP */ session_start(); $_SESSION['user_id'] = 'Testing User'; session_destroy(); ?> <html&...
S. A. Malik's user avatar
  • 3,675
2 votes
2 answers
3k views

I am working on a session management function in PHP. I found a webpage that shows how to implement session timeouts (https://solutionfactor.net/blog/2014/02/08/implementing-session-timeout-with-php/)....
psycoperl's user avatar
  • 150
3 votes
3 answers
780 views

Ok, so we got some basic HTML here <form action="main_login.php" method="post" style="text-align:right;"> Username: <input type="text" name="username" value="" size=20 style="...
DominusMors's user avatar
4 votes
6 answers
306 views

Some people say use unset($_SESSION["..."]) and some say session_unset() and some say $_SESSION = array() and some say session_destroy() and I am saying "for God's sake, this stuff is getting ...
Tarik's user avatar
  • 82.2k
-4 votes
2 answers
577 views

So far, i can log in the website, but i don't really know if i am actually creating a session. I heard about PHP being the solution to my question, but i am not really familiar with PHP. So can ...
A.Adams's user avatar
  • 65
0 votes
2 answers
218 views

By reading up on session_unset() and session_destroy() I've found notes that destroy does not clean up variables and such. How come the code below does not clean up the $_SESSION superglobal, which ...
p1100i's user avatar
  • 3,770
1 vote
2 answers
81 views

I'm building a small website project and I am curious if there would be any reason not to do session_destroy() when a user wants to log off? What about just before logging in a new user? The site ...
JDelage's user avatar
  • 13.8k
-3 votes
1 answer
43 views

Good morning guys, I have set this code and i would like to unset $_SESSION["username"], IF $_POST["logout"] isset <?php if (isset($_POST["name"]) && isset($_POST["password"])) $...
MOS's user avatar
  • 31