0
try
    {   
        $sql = "SELECT username, email FROM user
                WHERE username=:uname OR email=:uemail" ;
        $select_stmt = $koneksi -> prepare($sql);
        $arr = array(':uname'=>$username, ':uemail'=>$email);
        $select_stmt->bind_param("ss", $arr[':uname'], $arr[':uemail']);
        $select_stmt->execute();  
        $row=$select_stmt->get_result()->fetch_assoc();

error array and bind_param Fatal error: Uncaught Error: Call to a member function bind_param() on bool in C:\xampp\htdocs\UTS_DILA\register.php:35 Stack trace: #0 {main} thrown in C:\xampp\htdocs\UTS_DILA\register.php on line 35

1 Answers1

-2

You have this part:

$select_stmt = $koneksi -> prepare($sql);

If the prepare() method return false, you'll get an error. Maybe you have an error in the table name or colum names?

nervus
  • 21
  • 1
  • 1
  • 6