2014-05-02, 02:50 AM
I have MyBB installed at ./forums folder.
I have another page named profile.php at root. Below is part of code from profile.php .
Am I right to say that it will output $name if I had already logged into MyBB Forums? However, it keep telling me "You are not logged in!" .
Those file have not been uploaded to any server online yet. I'm testing it using my Localhost [WAMP Server]
I have another page named profile.php at root. Below is part of code from profile.php .
<?php
define("IN_MYBB", 1);
require ('forums/global.php');
if($mybb->user['uid'] > 0)
{
$uid = $mybb->user['uid'];
$user = get_user($uid);
$name = $user['username'];
echo $name;
}
else {
echo "You are not logged in!"; }
?>
Am I right to say that it will output $name if I had already logged into MyBB Forums? However, it keep telling me "You are not logged in!" .
Those file have not been uploaded to any server online yet. I'm testing it using my Localhost [WAMP Server]