How can Register_Globals affect PHP scripts and what are the potential problems associated with it?

Register_Globals can affect PHP scripts by automatically creating global variables from user input, which can lead to security vulnerabilities such as injection attacks and variable conflicts. To solve this issue, it is recommended to disable Register_Globals in the php.ini file.

// Disable Register_Globals in php.ini file
register_globals = Off;