可捕获的致命错误:类mysqli的对象无法在第13行的...中转换为字符串

时间:2016-06-30 18:53:36

标签: php mysqli

<?
ob_start();
session_start();

include('config.php');
include('login_form.php');

   if(isset($_POST["login"])){
$nickname = $_POST["nickname"]; //Név
   $password = md5($_POST["password"]); //Jelszó
   $lekerdezes = mysqli_query($conn, "SELECT * FROM users WHERE       nickname = '".mysqli_real_escape_string($conn, $nickname)."' AND password = '$conn, $password'");
   $vanelekerdezes = mysqli_num_rows($conn, $lekerdezes);
   if ($vanelekerdezes>0)
   {
      header('location: index.php');
      $adatok=mysqli_fetch_assoc($conn, $lekerdezes);
      $_SESSION["id"]=$adatok["id"];
      $_SESSION['bann'] = 0;
      $_SESSION["nickname"]=$adatok["nickname"];
      $_SESSION["rank"]=$adatok["rank"];      
      $_SESSION["Dollar"]=$adatok["Dollar"];
  }
   else
  {
   print 'Hibás felhasználónév vagy jelszó!';
   print mysql_error();
  }



   } else if(isset($_SESSION["nickname"])){


   print 'Üdv, '.$_SESSION['nickname'].'';
   }



?>

这是什么问题?它说:可捕获的致命错误:类mysqli的对象无法转换为第13行中的字符串 我不知道为什么,而且我没有在互联网上找到任何关于此事的内容。

0 个答案:

没有答案