I am trying to post the 'ID' from my html table to delete the row from the SQL database when the delete button is click. So far it would appear the POST is not working but the PHP code is.

Here is the JavaScript code which takes the selected table rows value from the first columns (ID) when I select it, and on pressing the delete button a message box displays the ID (this works fine so it would appear it is reading the value). The next part then displays a message box confirming the delete, which on clicking OK does nothing.

JavaScript

```
$(function(){

    $("#tblAssets tr").click(function(){
    $(this).addClass('selected').siblings().removeClass('selected');    

    });

    $('#btnDelete').click(function(e){
    var value = $("#tblAssets tr.selected td:first").html();
    alert(value);
        if (confirm("Are you sure you want to delete this asset?")) {
            $.ajax({
                type : "POST",
                url : "inventory_hardware_delete.php",
                data : value;
                success : function() {
                }
            });
        }
    });

});

```

And here is the PHP code. When I manually adjust $value to equal an ID in my database table it works and deletes the row. 

```
 $value = $_POST['value'];

 $sql = "DELETE FROM [Assets].[dbo].[Hardware] WHERE [ID] = $value";
 $result = sqlsrv_query( $conn, $sql); 

```

Thanks