This commit is contained in:
Suvodip
2024-05-07 18:54:29 +05:30
parent 13133d2d2a
commit 56fb4cb4fe
9 changed files with 935 additions and 72 deletions

View File

@@ -69,6 +69,7 @@
<tbody>
<?php
try {
// $bv_counter = 1;
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("SELECT * FROM addforms ORDER BY created_at DESC");
@@ -80,7 +81,6 @@
<td class="border-y-2 p-2 text-center"><?php echo $row['id']; ?></td>
<td class="border-y-2 p-2 "><?php echo $row['formname']; ?></td>
<td class="border-y-2 p-2 "><?php echo $row['bverticals']; ?></td>
<td class="border-y-2 p-2 text-center"><?php echo $row['time']; ?></td>
<td class="border-y-2 p-2">
<div class="flex flex-row justify-center">
<a href="/admin/edit-form/?id=<?php echo $row['id']; ?>">Edit</a> &nbsp; | &nbsp;
@@ -88,7 +88,7 @@
</div>
</td>
</tr>
<?php $bv_counter++; }
<?php }
$num_rows = $stmt->rowCount();
} catch (PDOException $e) {
echo "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";