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, 2022 in PHP by narikkadan
• 63,420 points
1,082 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, 2022 in PHP by narikkadan
• 63,420 points
635 views
0 votes
0 answers

Why command "php artisan serve" not working?

My Laravel on this path: C:\Users\Mad\Work\trunk\product\backend\v1.2.1\laravel But it is ...READ MORE

Jul 26, 2022 in PHP by Kithuzzz
• 38,010 points
1,232 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,880 points
5,147 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, 2022 in PHP by narikkadan
• 63,420 points
1,889 views
0 votes
0 answers
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, 2022 in PHP by Kichu
• 19,050 points
636 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, 2022 in Others by Aditya
• 7,680 points
6,264 views
0 votes
0 answers

PHP Unset Session Variable

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

Jun 9, 2022 in PHP by Kichu
• 19,050 points
856 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, 2022 in PHP by narikkadan
• 63,420 points
279 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, 2022 in PHP by narikkadan
• 63,420 points
443 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP