<?php
require_once 'conexion2.php';
if (isset($_POST['query'])) {
  $query = trim($_POST['query']);
  $stmt = $pdo->prepare("SELECT invoice_id FROM selling_info WHERE invoice_id LIKE ? LIMIT 10");
  $stmt->execute(["%$query%"]);
  while ($row = $stmt->fetch()) {
    echo "<a href='#' class='list-group-item list-group-item-action factura-item'>{$row['invoice_id']}</a>";
  }
}
