12

How do i...fatal error: uncaught error: call to a member function bind_param() o...

 3 years ago
source link: https://www.codeproject.com/Questions/5318318/How-do-i-fatal-error-uncaught-error-call-to-a-memb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Hi everyone! I have an error in my system when I log in and I don't know why,

Quote:

this is the error:


Fatal error: Uncaught Error: Call to a member function bind_param() on bool in C:\xampp\htdocs\clinica\logearse.php:10 Stack trace: #0 {main} thrown in C:\xampp\htdocs\clinica\logearse.php on line 10

Quote:

And this is the code:

Copy Code
<?php 
   //logeo
  include("conex.php");
  session_start();
  
   $name=$_POST['name'];
   $pass=$_POST['pass'];
   
    $sql=$conn->prepare('SELECT * FROM usuario WHERE name=? pass=?');
   $sql->bind_param('ss',$name,$pass); "HERE IS THE ERROR"
   $sql-execute();
   $result=$sql->get_result(); 
   
   if($row=$result->fetch_assoc()){
	   $_SESSION['nombre']=$name;
	  header("location:home.php");
   }else{
	   header("register.php");
   }
 
?>


What I have tried:

I tried some thing, but nothing and I dont why happened

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK