<input type="hidden" id="first" value="22" />
<input type="button" name="first" id="button" value="Отослать" />
// ...
<input type="hidden" id="second" value="23" />
<input type="button" name="second" id="button" value="Отослать" />
// ...
<input type="hidden" id="third" value="24" />
<input type="button" name="third" id="button" value="Отослать" />
// ...
$('#button').click(function() {
var id = $('#'+this.name).val();
// ... Отправка запроса
});