I have three buttons and need to save some data. I have a idea, I have to set an ID to every button and then let the JS determinate witch button that has been pressed, like:
$("#mySpecifikButton").click(function()
{
....some code here...
});
but then Im stuck. For example I have 9 users. All they have an ID in the db. So now we have all the users in separate rows:
<p><a id="userID">user 0</a></p>
<p><a id="userID">user 1</a></p>
<p><a id="userID">user 2</a></p>
<p><a id="userID">user 3</a></p>
...
When I press on a specifik user I want to add it to db through php with help of jquery. But how do I sent it to php with JS (jquery)?
Im I thinking right or is there better ways?
If I didn't described it well, ask me.