Page 1 of 1

register globals question

Posted: Mon Oct 10, 2005 12:29 am
by Ree
If the server has register globals on, will my code work fine? I code with register globals off in mind, so I use $_GET['var'], $_POST['var'] etc.

Posted: Mon Oct 10, 2005 1:01 am
by John Cartwright
Yes, as long as you keep a tight leache on the variables that may be modified..
Remember to always initialize your variables with default values, so that even if the malicious user tries to overwrite certain values his attempt will fail.