title: Fatal error: Uncaught Error: Call to a member function bind_result() on boolean in --- line22
body: <pre><code>&lt;?php
  $con = mysqli_connect("localhost","root","","swap"); //connect to database
  if (!$con){
      die('Could not connect: ' . mysqli_connect_errno()); //return error is 
  connect fail
  }
  ?&gt;
  
  &lt;?php
  $user= $_POST['iuser'];
  $name= $_POST['iname'];
  $pwd = $_POST['ipwd'];
  $cont= $_POST['icont'];
  $userid = $_POST['uid'];
  
  $updateuser=$con-&gt;prepare("UPDATE users SET username = '$user', password = 
  '$pwd', email = '$mail', contact = '$cont' WHERE userID ='" .$userid. "'");    
  $updateuser-&gt;bind_result($user, $pwd, $name, $add, $mail, $cont, $cardno);
  $updateuser-&gt;execute();`
  </code></pre>
  
  <p>i have checked against many other questions but cant seem to find any errors. any help?</p>