How, do I display 4 links, for example:
Each time a link is clicked, how do I give each link a rating of popularity, then on a separate page, display a popularity list 1-10. 1 being the best, and 10 being the worst?
How, do I display 4 links, for example:
Each time a link is clicked, how do I give each link a rating of popularity, then on a separate page, display a popularity list 1-10. 1 being the best, and 10 being the worst?
Do you mean like storing how many clicks there are? so the most clicked on link would be the most poular?
You could always do something like,
when they click the link it takes them too www.yourwebsite.com/goto.php?url
That page stores it in the database and then uses the headers function to move them onto the next page.
However, be wary of people browsing to that address and adding in bad variables in the url
Do you mean like storing how many clicks there are? so the most clicked on link would be the most popular?
Yes, exactly like that. Upon a user clicking a link, it would count up the amount of clicks. Then on a new page, the results will be display. The one with the most clicks as number 1 and the one with the least at number 10. How do I do that?
He just showed you. set up a page that accepts link URL's - make something in it to prevent people from skewing your stats, like a session ID or something from another page - then take that URL and log it in a database and increase the hit count in that row, then use header() to redirect them to the url.