Fatal Error:call to a member function Fetch_array () on a non-object in the line, how to handle

Source: Internet
Author: User
Fatal Error:call to a member function Fetch_array () on a non-object in
if ($_post[admin_user]!= "" | | $_post[admin_pass]!= "")
{
$conn =new mysqli ("localhost", "root", "DB_WLGL");
$conn->query ("Set names gb2312");
$admin _user=$_post[admin_user];
$admin _pass= ($_post[admin_pass]);
$sql = $conn->query ("Call Admin_regs (') $admin _user." ', ' ". $admin _pass." ");
$res = $sql->fetch_array (mysql_both); 62 rows
if ($res!=null) {

Session_register ("Admin_user");
Session_register ("Admin_pass");
echo "";
}else{
echo "";
}
}

?>
------to solve the idea----------------------
echo $conn->error; on line 62 Look
  • 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.