123456789101112131415161718192021222324252627282930 |
- <?php
- // 获取传递的ID
- $id = $_GET['goodsid'];
- include_once("../untils/conn.php");// 引入数据库连接配置文件
- $sql = "SELECT * FROM list WHERE id =" . $id;
- $result = mysqli_query($con, $sql);
- if ($result) {
- $row = mysqli_fetch_assoc($result);
- $downtel = $row['downtel'];
-
- switch ($downtel) {
- case 'one':
- include 'one.php';
- break;
- case 'two':
- include 'two.php';
- break;
- default:
- include 'one.php';
- break;
- }
- } else {
- // 处理查询失败的情况
- }
- // 关闭数据库连接
- mysqli_close($con);
- ?>
|