title: Execute PHP function with onclick
body: <p>I am searching for a simple solution to call a <strong>PHP function</strong> only when <strong>a-tag</strong> is clicked.</p>
  
  <p><strong>PHP:</strong></p>
  
  <pre><code>function removeday() { ... }
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;a href="" onclick="removeday()" class="deletebtn"&gt;Delete&lt;/a&gt;
  </code></pre>
  
  <p><strong>UPDATE:</strong> the html and PHP code are in the same PHP file</p>