Many times, it is necessary to turn off/disable Register globals for your site. You can turn off Register globals through the .htaccess file. So below are the steps to turn it off :-
Step 1: Create a .htaccess file under your domain or on your local computer and then upload it under the domain.
Step 2: Use the php directive below to turn Register globals off :-
php_flag register_globals off
Step 3: Make sure that the file is saved as .htaccess not .htaccess.txt, because htaccess is itself the extension of the file.
It’s done! To check if Register globals has been turned off or not, just create an empty xyz.php file anywhere on your web root under the domain and write the following line:
php
phpinfo();
?>
Open this file in any web browser using http://domain/xyz.php and check out the value for register_globals on the page.
]]>