First of all, though an experienced programmer (VB, C, C#, REXX and a bunch of other languages), I'm a total PHP virgin and fairly new to UBB Threads, so please excuse me if I'm missing something obvious here.
I'm trying to tie some stuff together (for the moment it's my own dynamically threaded chat, but more will follow) and need to get the name of the logged in user. After digging around in the UBB source and these forums, I found that it seems to be stored in $user['U_Username'] and $CheckUser.
So far so good. The problem is that when I access them, they come up empty, which leads me to believe that I should include something where these are defined. Three hours of digging through the source and I still can't find it.
I've narrowed it down in this simple script:
<br /><html><br /> <head><br /> <title>Test</title><br /> </head><br /> <body><br /> <p><br /> <?<br /> echo 'Test string';<br /> echo $user['U_Username'];<br /> echo $CheckUser;<br /> ?><br /> </p><br /> </body><br /></html>
This script results in "Test string" and nothing else. As I said, I'm probably just missing something obvious because I'm staring in the wrong place, but this silly problem has me stuck.
What am I doing wrong and how should I fix it?