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