madam,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
$("form").each(function(indx, form){
$("img",form).on("click", function() {
var amt=$('#t1',form).val();
var prc=$('#t3', form).val();
$('#t1',form).val('0');
$('#t3',form).val('0');
alert([amt,prc]) //для теста
// далее сами
})
});
});
</script>
</head>
<body>
<form>
<input type="hidden" id="t1" name="am" value="100">
<input type="hidden" id="t3" name="pm" value="200">
<img src="http://s7.hostingkartinok.com/uploads/images/2014/02/b33ecdff35171950f356df80a6a7c3dd.png" >
</form>
<form>
<input type="hidden" id="t1" name="am" value="12">
<input type="hidden" id="t3" name="pm" value="43">
<img src="http://s7.hostingkartinok.com/uploads/images/2014/02/b33ecdff35171950f356df80a6a7c3dd.png" >
</form>
</body>
</html>