What potential security risks are associated with using $_REQUEST instead of $_GET in PHP?

Using $_REQUEST instead of $_GET in PHP can introduce security risks because $_REQUEST includes data from both $_GET and $_POST, making it susceptible to injection attacks. To mitigate this risk, it is recommended to use $_GET when you specifically need data from the URL parameters.

// Using $_GET instead of $_REQUEST to mitigate security risks
$param = isset($_GET['param']) ? $_GET['param'] : '';