test
connect_error) { die("Connection failed: " . $conn->connect_error); } // Pagination logic $products_per_page = 20; $page = isset($_GET['page']) ? $_GET['page'] : 1; $start = ($page - 1) * $products_per_page; $sql = "SELECT * FROM sma_products LIMIT $start, $products_per_page"; $result = $conn->query($sql); ?> Product Grid View
num_rows > 0) { while($row = $result->fetch_assoc()) { echo "
"; echo "

" . $row["name"] . "

"; echo "

Price: $" . $row["price"] . "

"; // Add more product details as needed echo "
"; } } else { echo "No products found"; } ?>
close(); ?>