I'm basically working on a Bootstrap website I've made. I connected my Forum (MyBB) so I could log in through my website.
The problem now is that since I'm still getting used to PHP, I'm stuck attempting to replace the Sign in text with the name of the user and also the Sign Up with Logout or Disconnect.
This is so far how it looks:
And this is what i would like to achieve:
Also fetching the forum avatar and displaying it on the bar
This is my form:
<?php
if($mybb->user['uid'])
{
// If the user if logged in, display a welcoming message.
echo "<div class='welcome-msg'>Welcome back ".$mybb->user['username']."!<br /></div>";
echo "<div class='warning'>Log out.";
}
else
{
// If the user is not logged in, display the login form.
echo "<form action='forums/member.php' method='post'>";
echo "<input type='hidden' name='action' value='do_login' />";
echo "<input type='hidden' name='url' value='../index.php' />";
echo "<input id='user_username' placeholder='Username' type='text' name='username' maxlength='30' /><br />";
echo "<input id='user_password' placeholder='Password' type='password' name='password' /><br />";
echo "<input class='btn btn-warning' style='clear: left; width: 100%; height: 32px; font-size: 13px;' type='submit' name='submit' value='Login' />";
echo "</form>";
}
?>
I'm not asking for someone to actually make it, obviously. I just need some reference about how I could achieve it. (Ex: Using what type of)