Take me home country roads MySQL-based forum (7)

Source: Internet
Author: User
Tags sendmsg
# sendmsg.php
Require "func.php";
if ($b 1) {
if (Is_user_exits ($fromname) and Check_user_password ($fromname, $password)) {
Sendmsg ();
echo "Success!"



}
?>
###############
# setup.php
# This is the initialization program, only after the first execution of the upload, and then must delete, in order to avoid errors
#################
Require "func.php";
echo "

Initializing the database



";
echo "Establish database connection ... ok!
";
echo "Build table Boardinfo ...";
$sql = "CREATE TABLE boardinfo (name varchar () NOT NULL, Chinesename varchar () is not null)";
mysql_query ($sql) or Die ("error");
echo "ok!
";
echo "CREATE table user ...";
$sql = "CREATE TABLE user" (id int (one) not NULL auto_increment, name varchar () is not NULL, sex varchar (6), Realname varchar (2 0), Password varchar (+) not NULL, address varchar (+), Oicq varchar (TEN), homepage varchar (+), score int (one), phone Varch AR (e), email varchar (+), Regtime varchar (+), QM text, Slaveboard varchar ($), PRIMARY KEY (ID)) ";
mysql_query ($sql) or Die ("error");
echo "ok!
";
echo "CREATE TABLE Message ... ";
$sql = "CREATE TABLE message (ID int (one) not NULL auto_increment, name varchar (), fromname varchar (), writetime varchar ( Cont longtext, PRIMARY KEY (ID)) ";
mysql_query ($sql) or Die ("error");
echo "ok!
";
echo "Initialize the layout" PC "...";
Create_board_table (' computer ', ' pc ');
echo "ok!

";
echo "

Setup is complete!

";
echo "

A madman of the cold (computer maniac) ";
?>
# # Userinfo.php


<title>User Information</title>




if (!isset ($name)) {
?>

}
else {
Require "func.php";
if (Is_user_exits ($name)) {
$sql = "SELECT * from user where name= ' $name '";
$sql _result=mysql_query ($sql);
$row =mysql_fetch_array ($sql _result);
?>




































Detailed information
User name:
Real name:
Gender:
Address:
Phone:
OICQ:
Email: ">
Home: "target=" > "_blank"
Registration time:
Current points:



}
else {
echo "Please enter the correct legal existence of the user name";
}
}
Include "footer.php";? >


# viewmsg.php
Require "func.php";
if (Is_user_exits ($JL _forum[name]) and Check_user_password ($jl _forum[name], $JL _forum[password])) {
if (Isset ($job)) {
if (Is_this_user ($id)) {
Delmsg ($id);
}
}
$name = $jl _forum[name];
$sql = "SELECT * from message where name= ' $name '";
$sql _result=mysql_query ($sql);
$sum =mysql_num_rows ($sql _result);
?>


<title>View Message</title>





You currently have a message
















while ($sql _row=mysql_fetch_array ($sql _result)) {?> }?>
') ' >
On the > delete




}
else {
Show_error (4);
}
?>

The above describes the take me home country roads MySQL-based forum (7), including the Take Me home country roads aspects, I hope to be interested in PHP tutorial friends 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.