1234567891011121314151617181920212223242526272829303132 |
- <?php
- // 获取传递的ID
- $id = $_GET['id'];
- 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);
- ?>
|