This page is say.php
Include "Signup/mysql.inc";
if ($id 1) {
$sql = "SELECT * from $table where"; Show Reply Topic
$result =mysql_query ($sql) or Die (Mysql_error ());
$row =mysql_fetch_array ($result);
$title = "RE:". $row ["title"];
}
$ip = $REMOTE _addr;
$sql = "SELECT * from User_stus where ip= ' $ip '"; Querying the current user name
$result =mysql_query ($sql) or Die (Mysql_error ());
$row =mysql_fetch_array ($result);
if (! $row)//Determine if the user is logged in
{
echo "
";
echo "";
echo "";
Echo
Hehe!! Please login first
";
Echo
Return
";
Exit ();
}
else $userid = $row ["userid"];
if ($ok)
{
if ($title = = "" | | $c
{
echo "
Please add complete after submission ";
}
else{
$id =time (); Submit an article
$date 1=date ("y/m/d");
$title =htmlspecialchars ($title);
$c
$sql = "SELECT * from". $table;
$result =mysql_query ($sql) or Die (Mysql_error ());
$row 1=mysql_num_rows ($result);
$row 1++;
if ($id 1) {
$sql = "INSERT into Bbs_re (id,userid,date1,title,content) VALUES (' $id ', ' $userid ', ' $date 1 ', ' $title ', ' $content ')";
mysql_query ($sql) or Die (Mysql_error ());
$sql = "SELECT * from". $table. "WHERE";
$result =mysql_query ($sql) or Die (Mysql_error ());
$lin =mysql_fetch_array ($result);
for ($i =1; $i <6; $i + +)
{
$re = "R". $i;
if (! $lin ["$re"])
Break
}
$sql = "Update". $table. "Set". $re. " = ' $id ' where ';
}
Else
$sql = "INSERT into". $table. " (Id,userid,date1,title,content,row) VALUES (' $id ', ' $userid ', ' $date 1 ', ' $title ', ' $content ', ' $row 1 ');
$result =mysql_query ($sql) or Die (Mysql_error ());
if ($result)
{
Header ("location:php3.php?p=1&&table= $table");
Exit;
}
}
}
?>
<title>Xiaoyang</title>
"Target=" _self ", return True" > return
The above describes the Merry Lonely Christmas bbsphp & MySQL full version one, including Merry Lonely Christmas aspects of the content, I hope that the PHP tutorial interested in a friend helpful.