1234567891011121314151617181920 |
- <?php
- include "conn.php";
- checkLogin("信息管理");
- $str = textEncode($_GET['str'] ?? '');
- $sql = "select id,ProductImg,ProductName,unit from Products where productName like '%" . $str . "%'";
- $rs = $conn->query($sql);
- while ($row = $rs->fetch()) {
- ?>
- <li data-id="<?php echo $row['id']; ?>" data-unit="<?php echo $row['unit']; ?>">
- <div class="list-content">
- <div class="pic"><img src="<?php echo $row['ProductImg']; ?>" ></div>
- <div class="name"><?php echo $row['ProductName']; ?></div>
- </div>
- </li>
- <?php
- }
- ?>
|