I have a database with documents uploaded, there is a link to the uploaded document:
< Code> & lt; A href = "http: //
I want to call the function that writes on an action log, when such a link is clicked, e.g. Writer ($ userid, $ msg)
So I can see what document the user has viewed.
What would be the easiest way to do this?
I will add a js / jquery click event to the image and make an Ajax call to your php writelog function . Is this the best way to debate, but in this way I can complete the task.
& lt; A class = "clicked_link" & gt; $ ("Clicked_link"). Click (function () {var file_name = ..... $ .ajax ({...})});
Here is a non-JS version: The link has been loaded with a PHP page that loads the image and then displays the image every time the page is called And the author calls the call
Comments
Post a Comment