File Manager

Current Directory: /home/aissorg/public_html/fonts/qzfcvsedcv/werwcwsfs
Viewing File: /home/aissorg/public_html/fonts/qzfcvsedcv/werwcwsfs/fetch-donation-history.php.tar
home/aissorg/public_html/admin/php/fetch-donation-history.php000064400000001327151162410710020437 0ustar00<?php include('../include/config.php'); if (isset($_POST['customer_name'])) { $customer_name = mysqli_real_escape_string($con, $_POST['customer_name']); $sql = "SELECT amount, pan_number, donation_date FROM donations WHERE name = '$customer_name' ORDER BY donation_date DESC"; $result = mysqli_query($con, $sql); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { echo "<tr>"; echo "<td>" . $row['donation_date'] . "</td>"; echo "<td>$" . number_format($row['amount'], 2) . "</td>"; echo "</tr>"; } } else { echo "<tr><td colspan='3'>No donations found.</td></tr>"; } } ?>