Fatal error: Uncaught Error: Object of class mysqli_stmt could not be converted to string in [duplicate] - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Saturday, September 3, 2022

Fatal error: Uncaught Error: Object of class mysqli_stmt could not be converted to string in [duplicate]

$sql1 = "INSERT INTO tbl_member (name,email,password,cnic_number,gender,phone_number,address)"
               ." VALUES(?,?,?,?,?,?,?)";
        
    //mysqli_query($conn, "INSERT INTO tbl_member(name, email, password,cnic_number,gender,phone_number,address) VALUES ('$user_fullname', '$user_email', '$password1','$user_cnic', '$user_gender', '$user_mobilenumber', '$user_address' )");
      echo   $stmt = $conn->prepare($sql1);

        if ($stmt) {
        
            if ($stmt->bind_param('sssisis', $user_fullname, $user_email, $password1,$user_cnic, $user_gender, $user_mobilenumber, $user_address )) 
            {
                if ($stmt->execute()) {
                    die();
                   
         return true;
                }
            }
        }
        

Fatal error: Uncaught Error: Object of class mysqli_stmt could not be converted to string in C:\xampp\htdocs\E_HousingServices\dashboard\member\classes\member.php:414 Stack trace: #0 C:\xampp\htdocs\E_HousingServices\dashboard\register.php(19): Member->register(Object(mysqli), 'Rizwan Jafri', '6777676', 'ad2f67g22min@gm...', '111', '111', 'male', '03065133172', 'TS# 6 Hit Taxil...') #1 {main} thrown in C:\xampp\htdocs\E_HousingServices\dashboard\member\classes\member.php on line 414



source https://stackoverflow.com/questions/73586657/fatal-error-uncaught-error-object-of-class-mysqli-stmt-could-not-be-converted

No comments:

Post a Comment