Merry Lonely Christmas bbsphp & MySQL full version one

Source: Internet
Author: User
Tags date1
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.

  • 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.