title: Link redirect to delete a query with PHP
body: <p>Usually, when I need to delete a query, I don't know how to do it, I don't mean, I don't know the SQL code to do it. I mean I don't know the exactly way to "call" the function. The way I've found is to call the function via GET doing this:</p>
  
  <pre><code>&lt;?php
     $action = $_GET['action'];
     $id = $_GET['id'];
  
     if($action == 'delete'){
        echo "This would to the query to delete the element";
     }
  ?&gt;
  </code></pre>
  
  <p>So, The way I have to call it is by GET. I create a link with the next URI: </p>
  
  <p><code>http://localhost/test/index.php?action=delete&amp;id=1</code></p>
  
  <p>This actually works. But I don't like how does it works. I don't like this way, and I am wondering if there's any other way to do exactly the same, with Javascript, JSON or even AJAX. </p>