I have few links on my website, how can I record into database which user clicked on which link. I have records of the links into database and users. I have created a table in which there will be userid, linkid. But im not sure how to code this php. Any ideas?
EDIT:
<a hef="page.php?id=27">pagename</a>
the link above goes to a page where the link is counted and it looks for the url into the database and redirects to that page. But i want to see which user clicked it.