index.php
<ul class="top">
<?php if(!isset($_SESSION['login_user'])) { ?>
<li class="hover"><a href="#" onClick="revealModal('modalPage')">Login</a>
</li>
<?php } else {?>
<li class="hover"><a href="logout.php">Logout</a>
Welcome <?php echo $_SESSION['login_user']; ?>
</li>
<?php } ?>
<li><a href="registration.php" class="about">Registration</a>
</li>
</ul>
logout.php
<?php
session_start();
session_destroy();
header('Location:index.php');
exit;
?>
I have my log out button in my every page, so i want that , if an user clicks in log out, he/she should redirect to the same page.. as i ve given the location page index here, but i want to remain in the same page.. any code to redirect to same page ?? Thank you in advance ..