2007-07-21, 11:42 PM
I have the following code on a page of mine.
Everything is fine but there seems to be a problem with the
<?php
define("IN_MYBB", 1);
chdir('forum/'); // path to MyBB
require './global.php';
?>
<?php
if($mybb->user['uid'])
{
echo "Hey, $mybbuser[username].<br>
Thanks for logging in.";
}
else
{
echo "<form action='forums/member.php' method='post'>
Username: <input type='text' name='username' size='25' maxlength='30' /><br />
Password: <input type='password' name='password' size='25' />
<input type='hidden' name='action' value='do_login'>
<input type='hidden' name='url' value='index.php' />
<input type='submit' class='submit' name='submit' value='Login' /></form><br>";
}
?>
Everything is fine but there seems to be a problem with the
echo "Hey, $mybbuser[username].
because it does not display the user name. Any ideas for this?