e tamam
<div class="sepete">
<input onclick="addtocart(<?php echo $id;?>)" id="ekle_<?php echo $id;?>" type="button" class="sepete" value="Sepete Ekle">
</div>
</div>
<div class="detailx">
<div class="detail">
<input type="text" class="inputadet" id="adet_<?php echo $id;?>" value="1">
<div>Adet</div>
</div>
function addtocart(id){
var bunun_adeti = $("#adet_"+id).val();
var degerler = { 'id': id, 'adet' : bunun_adeti }
$.ajax({
type: "POST",
url: "modules/add.php",
data:degerler,
success: function(cevap)
{
location.reload();
}
});
}
bununla da karşılayacaksın php den...
$gelenid = $_POST["id"];
$gelenadet = $_POST["adet"];
düzelttim.