I have just coded a login form on my website to log users into my vBulletin forum from the main page. I have managed this fine sofar and the code I have used Is below. My problem is that it logs the users in and then takes them back to the index page. Once back at the index page they are loged into the forum however the login box still appears the same at the top. Meaning the user does not know if they are still loged in. You can see the login form in action on the top right of THIS PAGE <form action="http://www.xninelivesx.com/forums/login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)"> <script type="text/javascript" src="http://www.xninelivesx.com/forums/clientscript/vbulletin_md5.js"></script> <table border="0" cellpadding="0" cellspacing="3"> <tbody><tr> <td><input class="text-inp" style="font-size: 11px;" name="vb_login_username" size="10" accesskey="u" tabindex="101" value="USERNAME" onfocus="if (this.value == 'User Name') this.value = '';" type="text"></td> <td colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"> </tr> <tr> <td><input style="font-size: 11px;" name="vb_login_password" size="10" accesskey="p" tabindex="102" type="password" class="text-inp" value="PASSWORD"></td> <td><input value="Log in" tabindex="104" accesskey="s" TYPE="IMAGE" SRC="images/butup.gif" ALT="Submit button"></td> </tr> </tbody></table> <input name="s" value="" type="hidden"> <input name="do" value="login" type="hidden"> <input name="vb_login_md5password" type="hidden"> <input name="vb_login_md5password_utf" type="hidden"> </form> Code (markup): If you could tell me how to replace the box with you are loged in text that would be great. Or if you could let me know of any other solutions. Thanks, WXM Matty
Matt, I'm not sure if you can do that with html only but you surely can with PHP, asp etc. Try those. It will work.
I need to look into php, I have no PHP knowledge. If anyone could help me do this in php that would be great.
You would need to know php/mysql to do that. An easier way is just to create the page using all vBulletin functions. http://www.vbulletin.org/forum/showthread.php?t=62164 Should be of some use.
I cant make a new page as my website is quite large. So I will need to look into this. Do you know any websites that might help?
I'm not to good with my PHP but I think it would be something along the lines of using an if statement, for example <? php if (loggedin=1) ?> then display this otherwise.. <? php else : ?> display the login form. However i don't know the specifics of V Bullitien, i'm sure they'll have a tutorial of this on their site somehwere as its v.frequently needed. Edit i did a quick Google search on your behalf this might be what you are looking for i'm not too sure: http://www.vbulletin.com/forum/showthread.php?t=23524
Ok thanks for your reply i'll keep searching Edit: Whalst Im looking into this can anyone tell me how in HTML could i stop the login redirecting back to the website and just take the user to the forums loged in after they have entered their data on the main website?
You can do that inside http://www.xninelivesx.com/forums/login.php If your form makes it check within the vb login, doesn't it redirect them to the forum?