Change dataType: "HTML"
to dataType: "json"
and let me know if it works :)
(or just delete that line entirely as $.ajax autodetects)
Additionally, $.post() has a shorter syntax than $.ajax if you're not doing anything fancy, so you could just use the following
$.post("index.php", { inID: inID, memInd: memInd , t1: t1, t2: t2});
And while you're at it, it's good practice to quote your params as Sudip Pal mentions, but not necessary if your parameter name is strictly alphanumeric..
Debugging Round 1
Change the doSearch()
Javascript function to the following:
function doSearch(){
var inID = "inIdValue";
var memInd = "memIndVal";
var t1 = "t1Val";
var t2 = "t2Val";
alert("ID: "+inID+"memIND: "+memInd);
$.post("index.php",
{
inID: inID, memInd: memInd , t1: t1, t2: t2
},
function(data) {
$('body').html(data);
$('body').append('<button onclick="doSearch()">Reload</button>');
}
);
}
Backup the file as index2.php, then delete everything inside index.php and replace it all with the following (just copy and paste):
<?php
echo "<pre>";
print_r($_POST);
die("</pre>");
?>
Then please paste the results :)