Dysan Posted November 15, 2007 Share Posted November 15, 2007 Every time a link is clicked, how do I keep a record of the number of clicks a link has received, and store the results in a database? Quote Link to comment Share on other sites More sharing options...
kratsg Posted November 15, 2007 Share Posted November 15, 2007 Make all links go to "log.php" which contains source code to update the database with all the relevant details, then redirect the page to the URL provided. IE: http://www.yoursite.com/log.php?url=games.php However, downfalls for this include that you cannot go to games.php?id=5 without more extensive coding. Quote Link to comment Share on other sites More sharing options...
khalidorama Posted November 15, 2007 Share Posted November 15, 2007 HI, your code should query the column in the table. and then load the stored value to memory , just increment it and update the value in the table... so simple to do.. Quote Link to comment Share on other sites More sharing options...
Dysan Posted November 15, 2007 Author Share Posted November 15, 2007 I'm new to PHP, can you both give me an example on how you would achieve this? 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.