this is my insert.php script
<?php
$name=$_POST['Name'] ?? ''  ;
$address=$_POST['Address'] ?? '' ;
include("db_config.php");
$result = mysqli_query($con,"INSERT INTO `Firm`(`ID`,`NAME`,`ADDRESS`) VALUES ('','$name','$address')");    
$response = array();
 if($result){
    $response['success']=1;
    $response['message']="Record Inserted Successfully-".$result."--";
 }
else { 
    $response['success']=0;
    $response['message']="Insertion Failure-".$result."--";
 }
echo json_encode($response);
?>
this is the response code
request = new StringRequest(Request.Method.POST, Utils.INSERT_FIRM, new Response.Listener<String>() {
                    @Override
                    public void onResponse(String s) {
//                        Log.i("R","Response is "+s);
                        try {
                            JSONObject jsonObject = new JSONObject(s);
                            int success = jsonObject.getInt("success");
                            String message = jsonObject.getString("message");
                            Toast.makeText(Add_Firm.this,""+message+":"+ success,Toast.LENGTH_SHORT).show();
                        } catch (Exception e) {
                            Toast.makeText(Add_Firm.this, "Some Error"+e.toString(), Toast.LENGTH_SHORT).show();
                            Log.i("Error"," "+e.toString());
                        }
                    }
I am using php script to connect android with database When I click the submit button in application although insertion is happening at database but I keep getting this exception in android
org.json.JSONException: Value Connection of type java.lang.String cannot be converted to JSONObject
What is the issue ?
 
    