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

Forum based on mysql (1)_PHP tutorial

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

#############################################
This article is original. If quoted, please indicate the author's information.
作者:冷情疯子
Email: edincur@yeah.net
http://safebase.yeah.net
###############################################
## adduser.php ################################
###############################################
require("func.php");
if(empty($name) or empty($pwd1)){
   show_error(2);
   $founderr=1;
}
if (is_user_exits($name)){
    show_error(3);
    $founderr=1;
    }
if ($pwd1<>$pwd2){
     show_error(5);
     $founderr=1;
     }
if (strlen($name)>16 or strlen($pwd1)>16 or strlen($qm)>255){
    show_error(6);
    $founderr=1;
}
$password=$pwd1;
if (!$founderr){
      adduser();
      echo "成功!";
}

?>
######################
### admin.php ########
######################
require "func.php";
if (adminok()) {
?>


管理





请选择版面进行操作


  
    
    
  
  
      
          
          
          
        
$sql="select * from boardinfo";
$sql_result=mysql_query($sql);
while ($sql_row=mysql_fetch_array($sql_result)) {
?>
          
          
          
        
}
?>       
      
Chinesename Name

      

      

        英文名称:  
        
        

        中文名称:
        
        
        

        
      

    

if (isset($board)){
    $sql="select * from boardinfo where name='$board'";
    $sql_result=mysql_query($sql);
    $sql_row=mysql_fetch_array($sql_result);
    $name=$sql_row[name];
    $chinesename=$sql_row[chinesename];
?>       
      
        
          
        
        
          
        
        
          
        
        
          
        
        
          
        
        
          
        
      
  
            

              增加版主:  
              
              
              
              ">
            

          
  
            

              删除版主:  
              
              
              
            

          
  
            

              中文名称  
              ">
              

              英文名称
              ">
              
              
            

          

            

              
              ">
              
            

          
 
 

            }
      ?>
    



}
else {
    show_error(1);
}
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316362.htmlTechArticle####################### ####################### This article is original. If quoted, please indicate the author's information. Author: Cold-hearted Madman Email: edincur@yeah.net http://safebase.yeah.ne...
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