Rick, I've got a strange problem on this.
I'm having these codes: (in a different directory to w3t)
[:blue]
<html>
<head>
[:orange]
<?
// Require the library
require ("../forum/main.inc.php");
require ("../forum/languages/$lang[THIS_FILE]/wwwthreads.php");
// -----------------
// Get the user info
$Username = $w3t_myname;
$Password = $w3t_mypass;
$userob = new user;
$user = $userob -> authenticate("$Username","$Password","U_Username, U_Password, U_Groups, U_TimeOffset");
}
?>
<title>mediafront</title>
blah..blah..blah...
[:orange]
<?
if ($user['U_Username'])
{
echo "$lang[INTRO_SUB], $user[U_Username]";
}
else
{
echo "
<form method=POST action="$config[phpurl]/start_page.php">
<input type=HIDDEN name=Cat value="">
<font size=1>Your ID:</font>
<input type=text name = Loginname class="formboxes" size="8"><br>
<font size=1>Password:</font>
<input type=password name=Loginpass class="formboxes" size="8">
<input type=submit name=option value="Login" class="buttons">
<font size=1 color=#FF0000><a href=$config[phpurl]/newuser.php>Register Now!</a></font>
</form>
";
}
?>
blah..blah..
</body>
</html>
But the variable $user['U_Username'] seems not worked.
When I try to strip the above paragraph of codes to only:
[:orange]
echo "$lang[INTRO_SUB], $user[U_Username]";
I can see only [:orange]Welcome, on the screen.
But the same codes could be worked simply fine when this scripts was located in w3t's directory. What's the problem?
BTW, I use session for user authentication.