Armed Rebel Posted December 7, 2005 Share Posted December 7, 2005 I've just started learning PHP and I was wondering. Would it be a better idea to set a varible such as "$_GET[user_name]" as $user_info?Does it really matter? I've just been keeping it as $_GET[user_name]. Link to comment Share on other sites More sharing options...
Skemcin Posted December 7, 2005 Share Posted December 7, 2005 _GET defines the scope in which the variable is stored. It is always better to get in the habit of including the scope of the variable in all your calls. In ensures that a variable is not being defined in some other, unexpected, way - i.e. being hacked. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now