1 つの変数 (i) を php に送信する際に問題があります。私の変数 i は毎回 6 ですが、どうすれば修正できますか?
$(document).ready(function(){
for (i=1; i<=5; i++){
$('#rate'+ i +'_').click(function(){
sendValue($(this).val(),i);
});
}
});
function sendValue(str,str2){
$.post("/php/test.php",{ sendValue: str, sendValue2 : str2 },
function(data){
$('#display').html(data.returnValue);
}, "json");
}