Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables without POST and GET

Status
Not open for further replies.

JRBeltman

IS-IT--Management
Feb 5, 2004
290
NL
Hi there,
I used to be able to read POST and GET variables without specifying $_POST or $_GET (i.e. by calling $variable instead of $_POST["variable"]). However, my hosting provider must have changed something, cause this is no longer possible.

Can anyone tell me what could have changed?
Something to do with the global variables setting orso?

Cheers

JR
IT = Logic (except for a well known OS where it equals luck) -> Back to the Basics!
 
your host has probably upgraded its installations. for a few versions now, register_globals has been set to off by default.

you should address the new short globals $_POST/$_GET etc. if you absolutely can't do this, you can always turn register_globals back on but be aware that it is a big security hole. there is an article in the manual about this.
 
Leaving register_globals off is not just more secure. When you reference $_POST and $_GET directly, you produce code with an element of self-documentation already built in.

I strongly recommend that you get in the habit of using $_GET and $_POST and leaving register_globals set to off. PHP's programmers are thinking that with PHP 6 register_globals will not even be available:


Want the best answers? Ask the best questions! TANSTAAFL!
 
Hi guys,
many thanks for the answers.
YES! I had been lazy doing a quicky job! No more!

I corrected all code and things are happy again.

Just irritating that the host changed this and didn't inform me.

Oh well.
Thanks again for your help!

JR
IT = Logic (except for a well known OS where it equals luck) -> Back to the Basics!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top