after getting data from sql I tried to click ok the button to add 1 number (sum sql data number + 1) but the Java is still working on all the inputs for all the results that I an getting
<input type="text" id="<?php echo $row['number'];?>" >
<button value="1" id="<?php echo $row["id"];?>">1</button>
<script>
var theTotal = 0;
$('#<?php echo $row["id"];?>').click(function(){
theTotal = Number(theTotal) + Number($(this).val());
$('#<?php echo $row["number"];?>').val(theTotal);
});
$('#<?php echo $row["number"];?>').val(theTotal);
</script>
theTotalvariable. Is that what you want?theTotal? Just use$('#<?php echo $row["number"];?>').val(Number($(this).val())+1)