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
help if possible
Moderator: General Moderators
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
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.
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.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
If it's an issue of comfortability, just give your posted variables regular names early on in the code.
Beyond that, I can't see much reason to avoid $_POST and $_GET.
Code: Select all
if(isset($_POST['name'])) $name = $_POST['name'];