Jump to content

[SOLVED] str_replace doesn't work


dezkit

Recommended Posts

I have this script where as when i log out, i want the follow up link to be without the .php?logout, it's hard to explain, here is the code, thanks..

<table border="0" width="100%">
<tr>
<TD ALIGN="right">
<table height=1>
<?php
if(session_is_registered(myusername)){
  	   $logout = $_GET["logout"];
  	   if(isset($logout)){
   unset($_SESSION['myusername']);
   $phpself = $_SERVER["PHP_SELF"];
   $phpself2 = str_replace(".php?logout", "", "$phpself");
   echo "<meta http-equiv=\"refresh\" content=\"0; URL=$phpself2\">";
   } else { 
    echo "<font color=white size=\"-1\"><a href=\"/admin_gallery\">Edit the Gallery page.</a>                <a href=\"?logout\">Log Out</a></font>";
  }
}
?>
</table>
</table>

Link to comment
https://forums.phpfreaks.com/topic/133785-solved-str_replace-doesnt-work/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.