Does PHP support user assigned Superglobal variables?
Posted: Wed Oct 16, 2002 7:13 pm
Let me explain what I'm trying to do...
This is for a call center, and, among other thing, the progam is to track technical support calls. Each tech has their own unique login, and, when logged in, a session object is created w/their info.
The call log has information it pulls out of the database that doesn't change very often, like the problem type (in a dropdown box) and the solutions according to the problem type (also a dropdown box). I was hoping that, instead of using a "SELECT * FROM problemCode" on each page display I could just create a global (or super global from what PHP calls them it seems) array for ALL scripts to see, so there is only one select statement. This way MySQL can use it's time searching through call logs, or things that are actually changing. If the problemCode table is to be updated, then the array would be too.
Is this possible?
from "test1.php", the code
<?php
$GLOBALS['temp'] = "some text";
echo $GLOBALS['temp'];
?>
is fine, but after running that, then runing "test2.php"
<?php
echo $GLOBALS['temp'];
?>
is blank. Does PHP allow 'super global' variables assigned by the user?
Any suggestions, comments, tips, whatever would be greatly appreciated, thanks!
This is for a call center, and, among other thing, the progam is to track technical support calls. Each tech has their own unique login, and, when logged in, a session object is created w/their info.
The call log has information it pulls out of the database that doesn't change very often, like the problem type (in a dropdown box) and the solutions according to the problem type (also a dropdown box). I was hoping that, instead of using a "SELECT * FROM problemCode" on each page display I could just create a global (or super global from what PHP calls them it seems) array for ALL scripts to see, so there is only one select statement. This way MySQL can use it's time searching through call logs, or things that are actually changing. If the problemCode table is to be updated, then the array would be too.
Is this possible?
from "test1.php", the code
<?php
$GLOBALS['temp'] = "some text";
echo $GLOBALS['temp'];
?>
is fine, but after running that, then runing "test2.php"
<?php
echo $GLOBALS['temp'];
?>
is blank. Does PHP allow 'super global' variables assigned by the user?
Any suggestions, comments, tips, whatever would be greatly appreciated, thanks!
