Register Globals Query
| From: | caspar kennerdale | Date: | Tue, 29 Apr 2003 14:21:08 +0000 |
| Subject: | Register Globals Query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145658@lists.php.net to get a copy of this message | ||
I have a register globals query and apologise if I am going over old ground,
but I have not been able to clarify my issue in the archives.
I am in the process of updating a CMS I had written (but havent coded in 2
years).
Please excuse whast may seem like basic questions
I have two queries.
Switch functions now work by using $_GET['action']. I thing I am unclear
about is in order to refer to a case do you still refer to it in the url?
switch ($_GET['action']) {
default:
echo "<a href=\"admin.php?action=Test\">test</a>";
break;
case "Test":
echo "yep";
break;
}
(This works! I am not sure if I am missing the point about having register
globals turned off)
The next issue is how to refer to a second variable within this scenario.
My pre php 4.3 url would look like admin.php?action=Test&variable=123
It would seem that I would want to use $GET for both 'action' and
'variable', but all my attempts to call 'variable' in the above example dont
seem to work.
Any help would be much appreciated.