title: MySQL DELETE Query in PHP not executing
body: <p>I am using an ajax method to call a PHP script that should delete a row from my database upon clicking a button with the id 'delete'.</p>
  
  <pre><code>$('#delete').click(function () {
    var id = parseInt($('#content').attr('data-name'));
    // The row in my database has the type integer
    // Doing alert(id) correctly returns the value
  
  $.ajax({
    url : './php/delete.php',
    type: 'POST',
    data : id,
    success: function()
    {
        alert('success deleting ' + id);
        location.reload();
        // These both get called correctly, but the row is not actually getting deleted
    }
  });
  
  });
  </code></pre>
  
  <p>My PHP code is</p>
  
  <pre><code>&lt;?php
  $con=mysqli_connect("localhost","root","tulula15","content_test");
  
  if (mysqli_connect_errno())
    {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
  
  mysqli_query($con,"DELETE FROM htmlcontent WHERE id='$_POST[id]'");
  
  mysqli_close($con);
  ?&gt;
  </code></pre>
  
  <p>Running the same query in phpMyAdmin correctly deletes the row</p>
  
  <pre><code>DELETE FROM htmlcontent WHERE id=2
  </code></pre>
  
  <p>So the ajax returns successfully, but the query is not being executed.</p>
  
  <p>If someone could help me fix this I would very much appreciate it..</p>