MyBB Community Forums
External Login Page - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.4 (https://community.mybb.com/forum-80.html)
+------ Forum: MyBB 1.4 General Support (https://community.mybb.com/forum-81.html)
+------ Thread: External Login Page (/thread-74845.html)



External Login Page - Nandricka - 2010-08-02

Dear reader,


I'm trying to make the users of my forum login with their username and password on an external page.

Now, I searched around and found this piece of code:
<?php
define("IN_MYBB", 1);
require("forum/global.php");
?>
 
<form action='forum/member.php' method='post'>
<input type='hidden' name='action' value='do_login' />
<input type='hidden' name='url' value='index.php' />
Username: <input type='text' name='username' maxlength='30' /><br />
Password: <input type='password' name='password' /><br />
<input type='submit' name='submit' value='Log in' />
</form>

Problem is that it redirects to my forum, this shouldn't happen. It should redirect to another page.

How can I make this happen?




Kind Regards,


- Nandricka
Nobody?
Nobody? Huh


RE: External Login Page - zing - 2011-02-03

Here use this small change to the index

<?php
define("IN_MYBB", 1);
require("forum/global.php");
?>
 
<form action='forum/member.php' method='post'>
<input type='hidden' name='action' value='do_login' />
<input type='hidden' name='url' value='../index.php' />
Username: <input type='text' name='username' maxlength='30' /><br />
Password: <input type='password' name='password' /><br />
<input type='submit' name='submit' value='Log in' />
</form>  ?>