Why is PHP session destroy not working

0 votes

Why is session_destroy() not working?

Is there any other way to destroy the session in PHP?

if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) 
{   
    session_destroy();   
    session_unset();     
}

Can someone please help me on this?

Jun 12 in PHP by narikkadan
• 10,840 points
10 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
0 answers

ErrorDocument 404 /404.php is not working in .htaccess file in PHP

This is the Content of my .htaccess file is: ErrorDocument ...READ MORE

Jun 21 in PHP by narikkadan
• 10,840 points
30 views
0 votes
1 answer

How to check if php session is already started or not?

Hello kartik, Use session_id(), it returns an empty string ...READ MORE

answered Apr 1, 2020 in PHP by Niroj
• 82,720 points
2,863 views
0 votes
0 answers

PHP is not recognized as an internal or external command in command prompt

I am getting this error when I ...READ MORE

May 7 in PHP by narikkadan
• 10,840 points
84 views
0 votes
0 answers

PHP - If variable is not empty, echo some html code

I want to display some HTML code ...READ MORE

Jun 4 in PHP by Kichu
• 19,040 points
13 views
0 votes
1 answer

"Cannot send session cache limiter - headers already sent"

The line "Headers already sent" means that ...READ MORE

answered Feb 18 in Others by Aditya
• 7,280 points
438 views
0 votes
0 answers

PHP Unset Session Variable

I am working on creating a product ...READ MORE

Jun 9 in PHP by Kichu
• 19,040 points
23 views
0 votes
0 answers

What is the difference between Sessions and Cookies in PHP?

What is the distinction between Sessions and Cookies ...READ MORE

Jun 13 in PHP by narikkadan
• 10,840 points
3 views
0 votes
0 answers

Using sessions & session variables in a PHP Login Script

I have created a login and register ...READ MORE

Jun 17 in PHP by narikkadan
• 10,840 points
7 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP