Say I have the following, and that I got the IDs dynamically.
<div class="search_results">
<p>user 1 <a href="phpfile.php?id=3">Add</a></p>
<p>user 1 <a href="phpfile.php?id=4">Add</a></p>
</div>
If I didn't use ajax, I could catch the passed values in phpfile.php
with $_GET['id']
,
but how can I use that with jquery?
$.ajax({
type: 'GET',
url: 'phpfile.php', // how to add those values here?
success: function(data) {
// do smth
}
});