Home  >  Article  >  Backend Development  >  Forum based on mysql (2)_PHP tutorial

Forum based on mysql (2)_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 16:03:10889browse

#################################
## apply.php ####################
#################################


注册用户









注册新用户



  
      
    
    
      
    
    
      
    
  

        

          
        

      
 

        

          
            
              
              
            
            
              
              
            
            
              
              
            
            
              
              
            
            
              
              
            
            
              
              
            
            
              
              
            
            
              
              
            
            
              
              
            
            
              
              
            
            
              
              
            
            
              
              
            
          
用户名
                
                *
密码
                
                *
重复密码
                
                *
Email
                
                 
性别
                
              
真实性名
                
              
地址
                
              
电话
                
              
主页
                
              
OICQ
                
              
签名
                
              
 
                
                
              

        

      








##########################################
## chklogin.php #########################
########################################
require ("func.php");
$name=trim($name);
$password=trim($password);
$sql="select * from user where name='$name'";
$sql_result=mysql_query($sql);
$sql_row=mysql_fetch_array($sql_result);
if (($password==$sql_row[password])and(!empty($sql_row[slaveboard]))){
    setcookie("jl_forum[board]",$sql_row[slaveboard]);
    setcookie("jl_forum[name]",$name);
    setcookie("jl_forum[password]",$password);
    redirect2("manage_list.php");
}
else {
    show_error(4);
}
?>
###################################
#####  config.inc.php ##########
#############################

  $MYSQL_HOSTNAME = "localhost";
  $MYSQL_USERNAME = "root";
  $MYSQL_PASSWORD = "";

  $DATABASE = "forum";

  $pagesize=25;

  $copyright="Copyright © 2000, by Edincur, All Rights Reserved
";

  $admin_email="your_email";

  $admin_name="your_admin_name";         #论坛管理员名称
  $admin_password="your_password";       #论坛管理员密码

  $remove_score=4;  #被删除一篇扣除的分数
  $new_topic_score=5;   #发表新主题的分数
  $re_topic_score=3;   #回复一篇的分数

  mysql_connect($MYSQL_HOSTNAME, $MYSQL_USERNAME, $MYSQL_PASSWORD);
  mysql_select_db($DATABASE) or die(mysql_error());

?>
###############################

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/316358.htmlTechArticle################################# ## apply.php #################### ################################# html head title注册用户/title meta http-equiv=Content-Type content=text/htm...
Statement:
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