Answers to important questions about php and database

Source: Internet
Author: User
Why? Thank you for your answers to important questions related to PHPcode php and databases.
Too many? Thank you.


PHP code
  Login.html    User System logon    
   

PHP code
  dbconn.class.php
  

PHP code
  userModel.php
  prepare($sql);:                $result->bind_param("ss",$user_id,$user_password);                $user_id=$userid;                $user_password=$userpwd;                $result->execute();break;                }        case "student":{                $sql="select s_id,s_name,s_dep from stu_info where s_id=? ands_pwd=?";                $result=$mysqli->prepare($sql);                $result->bind_param("ss",$user_id,$user_password);                $user_id=$userid;                $user_password=$userpwd;                $result->execute();break;                }        }        $result->bind_result($user_id,$user_name,$user_dep);        while($result->fetch()){            $userlist=array(                'user_id'=>$user_id,                'user_name'=>$user_name,                'user_dep'=>$user_dep            );                }        $result->close();        $mysqli->close();        return userlist;    }?> 

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.