sayedsohail Posted September 3, 2007 Share Posted September 3, 2007 For some strange reason my logout.php file is not redirecting to index.php file, here is the code. <?php session_destroy(); echo "<center>Successfully, Logged out<strong>" .$row['NAME']. "</strong><BR> <BR><a href='index.php'>Click here if your browser is not redirecting automatically or you don't want to wait.</a><BR></center>"; print "<script>"; print "self.location='htdocs/index.php';" print "</script>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/67832-solved-logout-is-not-re-directing-to-indexphp-file/ Share on other sites More sharing options...
pocobueno1388 Posted September 3, 2007 Share Posted September 3, 2007 <?php session_destroy(); echo "<center>Successfully, Logged out<strong>" .$row['NAME']. "</strong><BR> <BR><a href='index.php'>Click here if your browser is not redirecting automatically or you don't want to wait.</a><BR></center>"; print '<script type="text/javascript">'; print "window.location='htdocs/index.php'"; print "</script>"; ?> Give that a try. Quote Link to comment https://forums.phpfreaks.com/topic/67832-solved-logout-is-not-re-directing-to-indexphp-file/#findComment-340949 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.