Forum Moderators: phranque

Message Too Old, No Replies

php path is wrong?

can't read my querystrings

         

sanblasena

10:49 pm on May 5, 2003 (gmt 0)

10+ Year Member



Hi, I am passing data from a form to a php program to interpret it. It works fine on one of my web hosting servers, but on the other, the querystring appears fine in the address bar, but the php program is not interpreting it - it appears as null when I print it. (The other server prints the data ok). The tech support people said most likely my 'path is wrong'. I dont have a path. Anyone have any ideas. They are using a new version on php, 4.3.1

Thanks, Pat

Birdman

10:58 pm on May 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try

$_POST[variablename]

or

$HTTP_POST_VARS[variablename]

See PHP Predefined Variables [php.net] for more info.

jatar_k

11:16 pm on May 5, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I would take a guess and say that on one server you have register_globals on (the one where the script works) and on the other it is turned off (where it isnt working).

Using Register Globals [php.net]

sanblasena

3:13 am on May 6, 2003 (gmt 0)

10+ Year Member



Yes, that's what it was - they had the register globals turned off - they turned them on for me and now it's working. You were right on. Thanks, Pat

grahamstewart

4:20 am on May 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I were you i would stick to having register_globals turned off and fix the code to work with it ( as noted above).

register_globals is a nasty potential security hole and most PHP installation come with it turned off these days. You don't gain anything by turning it on - expect the ability to be a bit lazier in your code.