What are the potential security risks associated with using old HTTP_*_vars instead of superglobal variables like $_GET and $_POST?

Using old HTTP_*_vars instead of superglobal variables like $_GET and $_POST can lead to security risks such as injection attacks, as the old variables are not sanitized automatically. To mitigate this risk, always use the superglobal variables like $_GET and $_POST, which are automatically sanitized by PHP.

// Use superglobal variables like $_GET and $_POST to prevent security risks
$user_input = $_POST['user_input'];