gpt4 book ai didi

php - MYSQL & PHP新闻系统

转载 作者:行者123 更新时间:2023-12-01 00:48:19 24 4
gpt4 key购买 nike

<分区>

我有这个新闻系统,但我不知道该怎么做:news.php?id=1 然后它会输出新闻 id 1。请帮助。

到目前为止我有这个:

<?php
include_once('includes/config.php');
if($id != "") {
$id = mysql_real_escape_string($id);
$sql = mysql_query("SELECT * FROM news WHERE id = '$id'");
}
$res = mysql_query($sql);
while($row = mysql_fetch_assoc($res)){
if(isset($_GET['id']));
echo $res['body'];
}
?>

它连接到数据库(详细信息存储在配置中)。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com