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>"; ?> 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. 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
Archived
This topic is now archived and is closed to further replies.