How can using $_REQUEST in PHP potentially lead to security vulnerabilities?

Using $_REQUEST in PHP can potentially lead to security vulnerabilities because it combines data from $_GET, $_POST, and $_COOKIE superglobals, making it susceptible to injection attacks. To mitigate this risk, it is recommended to use $_GET or $_POST specifically based on the type of data being accessed.

// Example of using $_POST instead of $_REQUEST
$username = $_POST['username'];
$password = $_POST['password'];