How can PHP users work around the issue of register_globals being set to off?

When register_globals is set to off in PHP, users can work around this issue by using the $_GET, $_POST, or $_REQUEST superglobals to access form data instead of relying on global variables. This ensures that input data is properly sanitized and reduces the risk of security vulnerabilities.

$username = isset($_POST['username']) ? $_POST['username'] : '';
$email = isset($_POST['email']) ? $_POST['email'] : '';