I'm not sure but I think this should work
For your form on another website
1 ) name the fields just as with the regular login page
2 ) <form action="http://www.YOURWEBSITE.com/forum/login.php" method="post" target="_top">
so point the form to the login page of the forum