What are the potential pitfalls of mixing $_POST and $_GET in PHP forms?

Mixing $_POST and $_GET in PHP forms can lead to security vulnerabilities such as data manipulation and injection attacks. To avoid these pitfalls, it is recommended to use either $_POST or $_GET consistently throughout the form handling process. This helps maintain data integrity and reduces the risk of malicious exploits.

// Example of using only $_POST in form handling
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // Process form data using $_POST variables
}