MyBB Community Forums

Full Version: Integrating MyBB into your website. (Login Form)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Notepad++ is the program i have found the best for coding Smile search on google for it.
dudes can u help me, i need this login form on my site, but mybb is installed on other site, can someone give me the code for login to work on my site if forum is on completely different site
D-Man, are the on the same domain? If no, then sorry I don't think it's possible, cookies will be a problem.
no, not on same domain, but i figured it out...
I did everything in this thread and it seems to have broke something else on my site.

www.twistedportal.com

useronline.php displays how many users are on my site in the top left corner, along with the date. I'm not quite sure how putting this login would cause an error. I originally had iB as my board and a login on the site and it worked very well. Hoping I can get the same results from this.

If anyone knows, that'd be great. Thanks.
hi there,

a useful thread a found in google, well done.

Trying to add the login box to my site but have a problem ...

two things, first it says im logged in but does not show my username it just says :

Quote:Hey, .
Thanks for logging in.

If i log out it shows login box.

Also, it seems that with that code on my page it stops all other variables passed from the URL from working.

Any thoughts?
Any help is apperciated.
Many thanks
Sir P Big Grin
Ok update on my last post I noticed a reply to this topic and fixed it by replacing my code with :

Quote:echo "Hey, ".$mybb->user['username'].".<br>
Thanks for logging in.";

That bit works great cheers.

But still have problem that the script stops any other variables been passed from the URL. any thoughts?
Cheers,

Sir P
Ive solved that problem just by calling the variables properly.

Going to start a new thread now about intergrating the register page Smile
  if($mybb->user['uid'])
  if($mybb->user['uid'])
  {
    echo "Hey, $mybbuser[username].<br>
    Thanks for logging in.<br />
    Nice to see you";
  }
  else
  {
    echo "<form action='forum/Upload/member.php' method='post'>
    Username: <input type='text' name='username' size='25' style='width:   100px;' maxlength='30' /><br />
    Password: <input type='password' name='password' style='width: 100px;' 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>";
  }
Well I can login on the forum but when I go back to my site I'm not logged in and there is just the login form. Why?