What are the potential security risks of having register_globals set to "On" in PHP scripts?

Having register_globals set to "On" in PHP scripts can lead to security vulnerabilities such as variable injection attacks and data manipulation. It is recommended to set register_globals to "Off" in the php.ini configuration file to mitigate these risks.

// Add this line to your php.ini file
register_globals = Off;