MyBB Community Forums

Full Version: Login Form for site?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im currently developing a site for my MyBB forums ive done it all except the login form, so could anyone possible give me the code to connect the site login form to the forums database please?
<form action="member.php" method="post">
<input type="hidden" name="action" value="do_login" />
<input type="text" name="username" title="Username" value="Username" onfocus="this.value=''" />
<input type="password" name="password" title="Password" value="Password" onfocus="this.value=''" />
<input type="submit" value="Go" />
</form>

Is that what you want? I copied the code from the bottom of the page.
No but thanks for trying, i need some php source so that the form will connect to the forums database.
The code he provided is correct and will log you in (you should try it next time Wink)! Basicly, it will use MyBB's member.php to log you in (just make sure member.php is pointing to the right place) and then redirect you back to where you were.
Maybe i didnt explain properly but i want it so that it uses the php code from the site not the forum to connect to the forum database and also for it to add cookies etc, but ive just sorted it myself Smile
Well, the MyBB member.php script does exactly that, but instead of it (the code) being in login.php, its in forums/member.php. I've used this code in the past and so have other members. It does work!