Mysql-based Forum (7)

Source: Internet
Author: User
Tags sendmsg
Mysql-based Forum (7) # sendmsg. php
Require "func. php ";
If ($ b1 ){
If (is_user_exits ($ fromname) and check_user_password ($ fromname, $ password )){
Sendmsg ();
Echo "successful!
";
}
Else {
$ Founderr = 1;
Echo "incorrect username/password! ";
}
}
Else {
?>


Send message








}
?>
###############
# Setup. php
# This is the initialization program. it is only executed for the first time after the upload and must be deleted to avoid errors.
#################
Require "func. php ";
Echo "initialize database

";
Echo "establish database connection... OK!
";
Echo "create table boardinfo ...";
$ SQL = "CREATE TABLE boardinfo (name varchar (50) NOT NULL, chinesename varchar (50) NOT NULL )";
Mysql_query ($ SQL) or die ("error ");
Echo "OK!
";
Echo "create table user ...";
$ SQL = "CREATE TABLE user (id int (11) NOT NULL auto_increment, name varchar (50) NOT NULL, sex varchar (6), realname varchar (20 ), password varchar (16) not null, address varchar (40), oicq varchar (10), homepage varchar (50), score int (11), phone varchar (20 ), email varchar (50), regtime varchar (20), qm text, slaveboard varchar (50), primary key (id ))";
Mysql_query ($ SQL) or die ("error ");
Echo "OK!
";
Echo "create table message ...";
$ SQL = "create table message (id int (11) NOT NULL auto_increment, name varchar (50), fromname varchar (50), writetime varchar (20), cont longtext, primary key (id ))";
Mysql_query ($ SQL) or die ("error ");
Echo "OK!
";
Echo "initialize the layout" personal computer "...";
Create_board_table ('computer ', 'PC ');
Echo "OK!

";
Echo "set up! ";
Echo"

Leng Qing madman (computer madman )";
?>
# Userinfo. php


User information





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 );
?>




































Details
User name:
Real name:
Gender:
Address:
Tel:
OICQ:
Email: ">
Home page: "target =" _ blank ">
Registration time:
Current points:



}
Else {
Echo "enter the correct and valid 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 );
?>


View messages


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.