What are the potential pitfalls of using <a href> for deleting database entries in PHP?

One potential pitfall of using <a href> for deleting database entries in PHP is that it exposes your application to security vulnerabilities such as Cross-Site Request Forgery (CSRF) attacks. To mitigate this risk, you should use a form with a POST request method instead of a simple link. This ensures that the action of deleting a database entry is only triggered when the form is submitted intentionally by the user.

&lt;form method=&quot;POST&quot; action=&quot;delete_entry.php&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;entry_id&quot; value=&quot;&lt;?php echo $entry_id; ?&gt;&quot;&gt;
    &lt;button type=&quot;submit&quot;&gt;Delete Entry&lt;/button&gt;
&lt;/form&gt;