Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 136
  • Last Modified:

GET does not work

I have reinstaled computer (now XP and last version of PHP 4.3.1).
Scripts that was working before (I use IIS build in XP) does not work not. Concrete GET metod does not transfer variables.

I call script 'script.php?var1=aaaaa&var2=bbbbb' and in script are var1 and var2 not assigned :(

(issset(var1) return false)

Can you help me, please?
thanks, Michal
0
michi001
Asked:
michi001
1 Solution
 
KC_SpeedballCommented:
Try $_get['var1']
0
 
linxitCommented:
In a little more detail:

Your old script relied on 'register_globals = on' in php.ini. However, it was found this was insecure, so for quite some time now the default is for register_globals to be off.

So, var1 is still available, but you have to reference it as $_GET['var1']. (NOT $_get['var1'] - variables are case-sensitive in PHP).

For post variables, use $_POST['varname'], and for $PHP_SELF you now use $_SERVER['PHP_SELF']

For a full explanation, look here:
http://www.php.net/manual/en/reserved.variables.php

Andy
0
 
VGRCommented:
yes to linxit (eugaine :D )

other solution : set register_globals=On in your php.ini file
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now