prepare($sql); $stmt->bind_param("ssss", $landlord_phone, $tenant_identifier, $month, $year); $stmt->execute(); $res = $stmt->get_result(); $total_paid = 0; $total_due = 0; $status = "unpaid"; $history = []; while($row = $res->fetch_assoc()){ $total_paid += $row['payment_amount']; $total_due = $row['total_due']; $status = $row['status']; $history[] = $row; } $amount_due = $total_due - $total_paid; ?>
Total Due:
Total Paid:
Status:
0): ?>Amount Remaining: