Jump to content

Destroying session variables


samved

Recommended Posts

Hi,

 

I am facing problems in destroying the session variables in my logout file  :'( .I have used session_id() in my php files for ex $sid = session_id().Now when I click on logout I naviagte to my index file but the session variable $sid still remain.I have chkd it.I have kept session_start() function in a file and I am including that file in every php by require_once function.The file is palced in Includes folder..is it causing the problem?? Plz help me out

 

Also can I use session_start() more than once in a single php file?

 

My logout file is :

 

<?php

        session_start();

session_destroy();

header("location:index.php");

exit();

?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/235764-destroying-session-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.