multiple calls to a file in the same function

multiple calls to a file in the same function

Hi,
I'm trying to in make in a single function, multiple calls to the same file changing one parameter the problem is that
it is taking it like if I wasn't changing the parameter and is sending only the last value all the times.

Here is my code:
$(function(){
$('#btn_search').click(function(){
// what to search for
var field = document.getElementById('searchbox').value;
// stype stands por "search type"
stype = "param1";
$.post("db.php", {search: field, type: stype}, function(data){process(data, stype);});
stype = "param2";
$.post("db.php", {search: field, type: stype}, function(data){process(data, stype);});
stype = "param3";
$.post("db.php", {search: field, type: stype}, function(data){process(data, stype);});
stype = "param4";
$.post("db.php", {search: field, type: stype}, function(data){process(data, stype);});
});
});

if I check the value of stype on the process function it always is "param4"
Can you give any advise or help on how to do this, thanks