supanoob Posted March 27, 2008 Share Posted March 27, 2008 Basically i want to know what people do and when they do it on my site, now i want it so it logs the page they use and the step they do for example if someone was to click the gym link and train speed it would log like this: gym.php?step=speed - 13:30:20 - 1 now that would tell me that USER ID 1 trained speed at 30 minutes and 20 second past 1 in the afternoon. The only thing is i dont know how to go about making it so the gym.php?step=speed gets inserted into the db. Any help with this would be much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/98208-page-logging/ Share on other sites More sharing options...
discomatt Posted March 27, 2008 Share Posted March 27, 2008 Try echo $_SERVER['REQUEST_URI']; Quote Link to comment https://forums.phpfreaks.com/topic/98208-page-logging/#findComment-502522 Share on other sites More sharing options...
MadTechie Posted March 27, 2008 Share Posted March 27, 2008 something like this $data = mysql_escape_string($_GET['step']); $result = mysql_query("INSERT INTO table SET `Fieldname` = '$data' "); Quote Link to comment https://forums.phpfreaks.com/topic/98208-page-logging/#findComment-502524 Share on other sites More sharing options...
supanoob Posted March 27, 2008 Author Share Posted March 27, 2008 Try echo $_SERVER['REQUEST_URI']; perfect thanks Quote Link to comment https://forums.phpfreaks.com/topic/98208-page-logging/#findComment-502528 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.