Hey, ben bir elemanın kimliği almak için çalışıyor ve daha sonra böyle bir sql sorgusu bu id göndermek ediyorum:
jQuery onay kutusu id alır:
$(document).ready(function() {
$(":checkbox").change(function(){
var id = $(this).attr('id');
$.post("index.php", { id: this.id, checked: this.checked },
function(data){
alert("Data Loaded: " + id);
}
);
//return false to insure the page doesn't refresh
});
});
Sonra php sorgu içine yerleştirin, ancak sayfada herhangi bir şey göstermez. Ne eksik?
$query1 = "SELECT * FROM explore WHERE category IN ('".$_POST["id"]."')
ORDER BY category LIMIT $start, $limit";