标签:dump user pat lin HERE gid where content mysq
<?php
//获取url参数
$msgId = $_GET[‘id‘];
#var_dump($msgId);
require_once("connect.php");
$sql = "select msgs.title,msgs.content,msgs.time,users.name from msgs,users where msgs.id = {$msgId} and msgs.authord = users.id";
$results = mysqli_query($link,$sql);
#var_dump($results);
$msg = mysqli_fetch_assoc($results);
mysqli_free_result($results);
mysqli_close($link);
//显示到页面中
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>显示留言</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
</head>
<body>
<div>留言标题: <?php echo $msg["title"];?></div>
<div>留言发表者: <?php echo $msg["name"]?></div>
<div>留言内容: <?php echo $msg["content"]?></div>
<div>留言时间: <?php echo $msg["time"]?></div>
</body>
</html>
标签:dump user pat lin HERE gid where content mysq
原文地址:https://www.cnblogs.com/wangshengli520/p/9914506.html