Re: URGENT: Session problem not carrying UserName over

From: Date: Fri, 13 Apr 2001 19:03:22 +0000
Subject: Re: URGENT: Session problem not carrying UserName over
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-48476@lists.php.net to get a copy of this message
In article <F14T7vBysOUmFfPWJhH00005b47@hotmail.com>, mjyuen@hotmail.com ("Mike Yuen") wrote: > /////////////////////////////////////////////////////// > // PROBLEM IS HERE!!!! CUserName doesn't show up > $eventrows = 0; > $query = "SELECT * FROM activities WHERE CUserName='$CUserName' AND > ADay='$d' AND AMonth='$themonth' AND AYear='$y'"; > print "<font size=-1>$query</font>"; > // > /////////////////////////////////////////////////////// Your only other reference to $CUserName prior to this is: <?PHP // Draw the Calendar global $CUserName; Right now that line is outside the function in which $CUserName is called. 'global' should be used *inside any function in which you want to make use of a variable from the global namespace instead of the function's local namespace. -- CC

« previous php.general (#48476) next »