Mevcut bulunduğu sayfanın adını $_SERVER["PHP_SELF"]; ile alıp, istediğiniz sayfaya eşit değilse session_destroy(); çalıştırın.