I'm quite used to using register globals. Often having links such as index.php?action=logout
I mainly like this because you can perform many actions without having to leave the page you're on (i.e. having to go to logout.php)
Should I be doing something else? Is there a better way without having to go to other pages?
[SOLVED]How do I not use register_globals?
Moderator: General Moderators
[SOLVED]How do I not use register_globals?
Last edited by Locust on Fri Aug 04, 2006 12:12 am, edited 1 time in total.
You can access the variables in the URL with:
If that is what your asking. Also look at $_POST
Code: Select all
$VariableName = $_GET['VariableName'];-
nickvd
- DevNet Resident
- Posts: 1027
- Joined: Thu Mar 10, 2005 5:27 pm
- Location: Southern Ontario
- Contact:
http://example.com/index.php?this=that& ... =other_one
Will give you:
The same will apply with your forms, which can be accessed via $_POST. Check out the following pages at php.net for further knowledge.
http://php.net/manual/en/language.varia ... efined.php
http://php.net/register_globals
... bah, too slow...
Code: Select all
var_dump($_GET);Code: Select all
array(3) {
["this"]=>
string(4) "that"
["lets_not"]=>
string(6) "forget"
["the"]=>
string(9) "other_one"
}http://php.net/manual/en/language.varia ... efined.php
http://php.net/register_globals
... bah, too slow...