I am working with PHP and mySQL. On page1.php there will be an image that when the user clicks on it there will be a query that inserts into mysql some data. How can I do this without reloading the page or transferring the user someone else and change the image?
What I did so far is to do this but with reloading the page.
Thanks for your ideas/examples.
It is as simples as executing the post method of jQuery library.
Here is an example that calls a PHP script when clicking any image.
In the “executequery.php” you would need to build the SQL and execute it.
Here is the documentation of the method. http://api.jquery.com/jQuery.post/