In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]