Simple vB User login

umbrae

New Member
Hi.

Can somebody help me with VB integration. I've tried his code, but it keeps redirecting to the same page as the login box.

Code:
<?

if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
print("<span class='welcome'><br><br><center>Welcome back, $username!&nbsp;&nbsp;&nbsp;&nbsp;<br><br><a href=\"/forum/\">Visit the Forums</a>&nbsp;&nbsp;&nbsp;&nbsp;</center>");
} else {
?>
<form action='/forum/login.php' method='post' onsubmit='md5hash(vb_login_password,vb_login_md5password)'>
        <script type='text/javascript' src='/forum/clientscript/vbulletin_md5.js'></script>
         <table cellpadding="1" cellspacing="3" border="0">
         <tr>
         <td class="login">User Name</td>
         <td><input type='text' class='button' name='vb_login_username' id='navbar_username' size='13' accesskey='u' tabindex='1' value='' /></td>
         <td class="smallfont" colspan="2" nowrap="nowrap"><input type='checkbox' name='cookieuser' value='1' tabindex='3' id='cb_cookieuser_navbar' accesskey='c' checked='checked' /><span class='login'>Remember Me</span></td></tr>
<tr><td class="login">Password</td>
<td><input type='password' class='button' name='vb_login_password' size='13' accesskey='p' tabindex='2' /></td>
<td><input name="submit" type='submit' class='button' accesskey='s' tabindex='4' title='Log In' value='Log In' /></td>
</tr></table>
        <input type='hidden' name='do' value='login' />
        <input type='hidden' name='forceredirect' value='0' />      
        <input type='hidden' name='vb_login_md5password' />
        </form>
        <?
}
?>


Anybody has a better scrip? I was hoping for a script with cookies feature.
 
Top