Skip to content
Advertisement

Page not redirect after logout in PHP

I have two situation, currently I’m run my script from two different places with same script, first from localhost and second from website. The problem is when I run locally it logout successfully, it will redirect to index.php but why when I run at website it’s not 100% working? The logout function is working but it’s not redirect to index.php, It still appear the same page not index.php page.

My Logout Code as below:

JavaScript

My Session Code as below:

JavaScript

Advertisement

Answer

Finally, I found it by myself, the simple code that I found is:

JavaScript

Anyway, thanks to all of you that want to try to help me.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement