org.json.JSONException: Value <br><table of type java.lang.String cannot be converted to JSONObject? : I know there a lot of people with the same problem but any answers can help me. And all just confuse me.
I'm trying to do a Login/Register on Android Studio.
The problem display is the follow.    

    W/System.err: org.json.JSONException: Value <br><table of type java.lang.String cannot be converted to JSONObject 
    W/System.err:     at org.json.JSON.typeMismatch(JSON.java:111)
    W/System.err:     at org.json.JSONObject.<init>(JSONObject.java:160)
    W/System.err:     at org.json.JSONObject.<init>(JSONObject.java:173)
    ...

This is my code.

    final Button bRegister = (Button) findViewById(R.id.rButton);

        bRegister.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                final String name = etName.getText().toString();
                final String username = etUsername.getText().toString();
                final String password = etPassword.getText().toString();

                Response.Listener<String> responseListener = new Response.Listener<String>() {
                    @Override
                    public void onResponse(String response) {
                        try {
                            JSONObject jsonResponse = new JSONObject(response);
                            boolean success = jsonResponse.getBoolean("success");
                            if (success) {
                                Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);
                                RegisterActivity.this.startActivity(intent);
                            } else {
                                AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);
                                builder.setMessage("Register Failed")
                                        .setNegativeButton("Retry", null)
                                        .create()
                                        .show();
                            }
                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    }
                };

                RegisterRequest registerRequest = new RegisterRequest(name, username, password, responseListener);
                RequestQueue queue = Volley.newRequestQueue(RegisterActivity.this);
                queue.add(registerRequest);
            }
        });
    }
}

And of course the php one.

    <?php
    $con = mysqli_connect("host", "user", "password", "database");
    
    
    $name = $_POST["name"];
    $username = $_POST["username"];
    $password = $_POST["password"];
    $statement = mysqli_prepare($con, "INSERT INTO user (name, username, password) VALUES (?, ?, ?)");
    mysqli_stmt_bind_param($statement, "sss", $name, $username, $password);
    mysqli_stmt_execute($statement);
    
    $response = array();
    $response["success"] = true;  
    
    echo json_encode($response); 

Thanks in advance for the help and sorry for the trouble.
