If I have understood correctly, you want to destroy the sessions set
in every other pages already. I will demonstration a little behavior of how it should actually be, and hopefully you will find the place where you were messing up.
Let's say we have a page1.php
we have just started using sessions.
page1.php
<?php
// starts session
session_start();
// setting variable values during session
$_SESSION['ID']='13CS54';
$_SESSION['name']='Muneer';
$_SESSION['account']='Stack Overflow';
echo "You have set the sessions";
?>
Now on another page let's say page2.php
, you are using those sessions.
page2.php
<?php
//don't forget to put session_start(); in the start
session_start();
echo "ID: " .$_SESSION['ID']."<br>";
echo "Name: " .$_SESSION['name']. "<br>";
echo "Account: " .$_SESSION['account'];
?>
On page3.php
or you wish to use/add more sessions.
page3.php
<?php
//yes, add the session_start(); (always)
session_start();
$_SESSION['country'] = 'Pakistan';
echo "ID: " .$_SESSION['ID']."<br>";
echo "Name: " .$_SESSION['name']. "<br>";
echo "Location: " .$_SESSION['country'];
?>
Now, on page4.php
you wish to destroy all the sessions made on every page.
page4.php
<?php
session_start();
session_destroy();
?>