<?php
$con=mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);

$id=$request->getAttribute('id');
$response=array();

$sql"DELETE FROM pwe_answersheet_submit WHERE id='$id' ";

if($con->query($sql)){
    $data=array(
        "id"=> $id
    );
    $message=$data;

    $response=array('status' => "true", 'message'=> "data deleted successfully", 'Exam_list' => $message);
    echo json_encode($response);
}
else{
    $response2=array('status'=>"false", 'message' => "failed to delete data");
    echo json_encode($response2);
}

?>