BBS (PHP & MySQL) full version (ii)

Source: Internet
Author: User
Tags count explode include mysql
This page is 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 ());




?>

<title>xiaoyang</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
?

Include "js/menuhead.php"
?>

<script language= "JavaScript" >
<!--
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";
?>





<div id= "Layer6" style= "Position:absolute; left:409px; top:29px; width:118px; height:17px; Z-index:1 "></div>
<div id= "Layer5" style= "Position:absolute; left:63px; top:61px; width:464px; height:303px; Z-index:2 ">

<table width= "100%" border= "1" cellspacing= "0" cellpadding= "0" bordercolor= "#FFCCFF" >
<tr>

&LT;TD width= "22%" height= ">"
<div align= "center" ><font color= "#FF3399" size= "2" > Topic </font></div>
</td>

&LT;TD width= "78%" height= ">"
<div align= "center" ><font size= "2" color= "#9966FF" ><?echo $row ["title"]; ></font> </div>
</td>
</tr>
<tr>
&LT;TD width= "22%" height= ">"
<div align= "center" ><font color= "#FF3399" size= "2" > Author </font></div>
</td>

&LT;TD width= "78%" height= ">"
<div align= "center" ><font size= "2" color= "#9966FF" ><?echo $row ["userid"]; ></font> </div>
</td>
</tr>
<tr>
&LT;TD width= "22%" >
<div align= "center" ><font color= "#FF3399" size= "2" > Content </font></div>
</td>

&LT;TD width= "78%" >
<div align= "left" ><font size= "2" color= "#9966FF" &GT;&LT;? $file =explode ("n", $row ["content"]); $num =count ($file);
For ($i =0 $i < $num $i + +) echo "". $file [$i]. " <BR> ";? ></font></div>
</td>
</tr>
</table>




?


For ($j =1 $j <6; $j + +)//Show reply content
{
$re = "R". $j;
if ($row ["$re"])
{
$id 2= $row ["$re"];
$sql = "SELECT * from Bbs_re where id= ' $id 2 '";
$result =mysql_query ($sql) or Die (Mysql_error ());
$row 8=mysql_fetch_array ($result);
echo "<BR>";
echo "<table width=100% border=1 cellspacing=0 cellpadding=0 bordercolor= #FFCCFF > <tr>";
echo "<td width=22% height=17> <div align=center><font color= topic size=2> T;/div> ";
echo "</td> <td width=78% height=17>";
echo "<div align=center><font size=2 color= #9966FF >". $row 8["title"]. " </font> </div> </td> </tr> <tr> ";
echo "<td width=22% height=24>";
echo "<div Align=center><font color= #FF3399 size=2> author </font></div></td>";
echo "<td width=78% height=24>";
echo "<div align=center><font size=2 color= #9966FF >". $row 8["userid"]. "</font> </div></td > </tr><tr> ";
echo "<td width=22%><div align=center><font color= #FF3399 size=2> content </font></div>";
echo "</td> <td width=78%>";
echo "<div align=left><font size=2 color= #9966FF >"; $file =explode ("n", $row 8["content"));
$num =count ($file);
For ($i =0 $i < $num $i + +) echo "". $file [$i]. " <BR> ";
echo "</font></div>";
echo "</td> </tr> </table>";
}
}

?>

<BR><BR>
</div>
<div id= "Back" style= "position:absolute; left:455px; top:30px; width:85px; height:3px; Z-index:3 ">
</div>
<div id= "GoBack" style= "Position:absolute; left:461px; top:23px; width:120px; height:16px; Z-index:2 ">
<div align= "center" ><a href= "Php3.php?p=1&&table=<?echo $table;? > "target=" _self "><font size=" 2 "color=" #FF33FF "> Return </font></a></div>
</div>
<div id= "Lay" style= "Position:absolute; left:70px; top:30px; width:85px; height:3px; Z-index:4 ">
</div>
<div id= "Laye" style= "Position:absolute; left:78px; top:23px; width:120px; height:16px; Z-index:1 ">
<div align= "center" ><a href= "SAY.PHP?ID1=&LT;?" echo $id. " &&table= ". $table;? > "target=" _self "><font size=" 2 "color=" #FF33FF "> Reply </font></a></div>
</div>
<p> </p>
<p> </p>
</body>


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.