CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 missing globals?

Print topic Send  topic

Author Message
p3ptools

Posts: 19
Posted: 04/29/2004, 4:06 PM

Please look at this global dump

$GLOBALS["SECULAR"] == 1
$GLOBALS["op_msg"] ==

each of these was set by the following code
in a before_show event

<CODE>
global $SECULAR;

if ( $custom[personalization][SECULAR] != "" )
{
$SECULAR = 1;
} else {
$SECULAR = 0;
}

global $op_msg;

$op_msg = $msg;

</CODE>

$msg DOES contain a value.

If I change the assignment to a literal value such as "TEST"
then its found in the global dump?

Why am I loosing this value??

Why should a constant asignment be carried over and not a variable?


Stephen
_________________
Sometimes the complaints will be false...
View profile  Send private message
p3ptools

Posts: 19
Posted: 04/30/2004, 12:09 AM

Hello,
I have a partial solution to this problem.
My missing session variables were a scoping issue.

After reading a bit more on php.net, I found the magic statement
that session variables registered within a function (Code charge is one large collection of functions :) ) must be declared global.

Once I declared my session var global I could then see it in other
events on the page.

Stephen
_________________
Sometimes the complaints will be false...
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.