Page 1 of 1
help if possible
Posted: Mon Feb 12, 2007 6:25 am
by elan123
Hi All,
Is this possible to get the values of the HTML form on the other page without using the _GET or _POST super global variable ?
If yes then please tell me how can i do it.
Note: i think it is possible by changing php.ini file's setting
Thank in advance
Chaitenya
Posted: Mon Feb 12, 2007 7:21 am
by CoderGoblin
Previous versions of PHP did have an option "register_globals" which could be set. This was switched off in PHP5 by default (previously it defaulted to on). The main reason... SECURITY with a side reason of side effects which were difficult to track down. PHP6 will remove this option entirely.
Using $_POST or $_GET is good practice and not difficult. Can you give a reason why you would not want to use them ?
If you need to retain values for some reason, try using sessions.
Posted: Mon Feb 12, 2007 7:53 am
by superdezign
If it's an issue of comfortability, just give your posted variables regular names early on in the code.
Code: Select all
if(isset($_POST['name'])) $name = $_POST['name'];
Beyond that, I can't see much reason to avoid $_POST and $_GET.
Posted: Mon Feb 12, 2007 8:05 am
by elan123
Thanks a lot Mr CoderGoblin.
My problem get solved by your kind help.
Posted: Mon Feb 12, 2007 8:11 am
by Oren
elan123 wrote:My problem get solved by your kind help.
Then please edit the Subject of this post from:
help if possible to:
help if possible [SOLVED].