What potential security risks are associated with using GET requests for deletion operations in PHP?

Using GET requests for deletion operations in PHP can pose security risks as GET requests are visible in browser history, server logs, and can be easily bookmarked or shared. This can lead to unintentional deletion of data if a user unknowingly accesses a deletion link. To mitigate this risk, deletion operations should be performed using POST requests instead.

<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    // Perform deletion operation here
}
?>