What is the potential issue with using GET method for deleting data in PHP?
Using the GET method for deleting data in PHP can be problematic because GET requests are visible in the URL, which means that sensitive data can be easily exposed and manipulated. To solve this issue, it is recommended to use the POST method for deleting data, as POST requests are not visible in the URL.
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// Delete data here
}