peterisgb Posted December 4, 2011 Share Posted December 4, 2011 i've been working on a little addon so that it shows the last page the user is on. i used this code global $db,$ir; $db->query("UPDATE users SET lastpage='Users Online' WHERE userid=$userid"); but this means i'll have to put it on every page :( which will take forever. so with that in mind i decided to put this code below in header.php global $db,$ir; $db->query("UPDATE users SET lastpage='".$_SERVER['PHP_SELF']."' WHERE userid=$userid"); Which works might i say but there is a little snag with it, the first code is displays like this "Users Online" but using the PHP self code it comes out like this "/game/usersonline.php". Is there a way to use the PHP SELF code but not display the whole link, but instead just the page that the user is on, Thanks for any replys or help on this. Quote Link to comment Share on other sites More sharing options...
peterisgb Posted December 5, 2011 Author Share Posted December 5, 2011 erm.. i would of though so, but this doesnt work so i cant really tell you. Quote Link to comment 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.