How to load a data using ajax-php with parameters : <p>i got a link that performs a javascript function onclick</p>

<pre><code>&lt;input type='hidden' id='name'&gt;
&lt;a href='#' onclick='getUsers(1)'&gt;Click here&lt;/a&gt;
function getUsers(id){
  $('#name').val(id);
}
</code></pre>

<p>whenever i click the link i want to pass the '1' to be the value of the hidden input type.</p>

<p>after that i want to perform an ajax to use the value of the hidden input type for my mysql query.</p>

<p>would that be possible?</p>

<p>Thank you</p>
