Home > Backend Development > PHP Tutorial > take me home country roads mysql based forum (7)

take me home country roads mysql based forum (7)

WBOY
Release: 2016-07-29 08:34:12
Original
1170 people have browsed it

# sendmsg.php
require "func.php";
if ($b1) {
if (is_user_exits($fromname) and check_user_password($fromname,$password)) {
sendmsg();
echo "Success!

";
}
else {
    $founderr= 1; c Echo "Username/Password error!";
    }
}
else {
?>


发送留言





  
      
      
    
      
      
      
    
      
      
      
    
      
      
      
    
  
  
        发送留言
您的用户名:   
        
        *
您的密码:   
        
        *
内容:   
        
        
        

        
              




}
?>
###############
# setup.php
# This is the initialization program. It is only executed for the first time after uploading. It must be deleted afterwards to avoid errors
## ##############
require "func.php";
echo "

Initialize database



";
echo "Create 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 board "PC"...";
create_board_table('computer','PC');
echo "ok!

";
echo "

Setup completed!

";
echo "

冷情疯子(电脑疯子)";
?>
## userinfo.php


用户信息




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



  
    
  
  
    
  
  
    
  
  
    
  
  
    
  
  
    
  
  
    
  
  
    
  
  
    
  
  
    
  
  
    
  
详细资料
用户名:
真实姓名:
性别:
地址:
电话:
OICQ:
Email:
主页:
注册时间:
目前积分:



        }
        else {
            echo "请输入正确合法存在的用户名称";
        }
}
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);
?>


察看留言





您目前共有 条留言



while ($sql_row=mysql_fetch_array($sql_result)) {
?>
    
    
  
  
    
  
  
    
  
}
?>
  
      于 ">删除
 

 




}
else {
    show_error(4);
}
?> 

以上就介绍了take me home country roads 基于mysql的论坛(7),包括了take me home country roads方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template