• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

BBS(php & mysql)完整版(二)_php基础

php 搞代码 4年前 (2022-01-26) 74次浏览 已收录 0个评论

//此页面为look.php
<?
include “signup/mysql.inc”;
$sql=”select * from “.$table.” where id=’$id'”;
$result=mysql_query($sql)or die(mysql_error());
$row=mysql_fetch_array($result);
$number=++$row[“number”];

$sql=”update $table set number=’$number’ where id=’$id'”;
mysql_query($sql)or die(mysql_error());

?>

xiaoyang
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>
<?

include “js/menuhead.php”
?>

<script language=”JavaScript”>
<!—ecms -ecms
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName==”Netscape”)&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// –>
</script>

<body bgcolor=”#FFFFFF” text=”#000000″>
<?

include “js/menu.php”;
?>

题目

<?echo $row[“title”] ;?>

作者

<?echo $row[“userid”] ;?>

内容

<? $file=explode(“n”,$row[“content”]); $num=count($file);
for($i=0 ;$i<$num;$i++) echo " ".$file[$i]."
“;?>

<?

for($j=1;$j<6;$j++) //显示回复内容
{
$re=”r”.$j;
if($row[“$re”])
{
$id2=$row[“$re”];
$sql=”select * from bbs_re where id=’$id2′”;
$result=mysql_query($sql)or die(mysql_error());
$row8=mysql_fetch_array($result);
echo “
“;
echo ”

“;
echo ”

“;
echo “

“;
echo ”

“;
echo ”

题目

“;
echo ”

“;
echo ”

“.$row8[“title”].”
“;
echo “

作者
“;
echo “

“.$row8[“userid”].”
内容

“;
echo “

“;
/本文来源gao@!dai!ma.com搞$$代^@码5网@搞代gaodaima码 echo “

“; $file=explode(“n”,$row8[“content”]);
$num=count($file);
for($i=0 ;$i<$num;$i++) echo " ".$file[$i]."
“;
echo “

“;
echo ”

“;
}
}

?>




” target=”_self” onm ouseOver=”window.status=”; return true”>返回


” target=”_self” onm ouseOver=”window.status=”;return true”>回复


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:BBS(php & mysql)完整版(二)_php基础

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址