PDA

View Full Version : Using the VB member database outside VB


briangrapes
07-14-2003, 05:37 PM
I would like my members to be able to enter their vBulletin login information into a form that I need to make since I only want board members to be able to participate. I've tried searching and searching for something simple to do this but still haven't had any luck and the clock is ticking for me to get this done in time before it's useless. I tried writing something myself:<?php
$link_forum = mysql_connect("localhost","user","password");
$select_db = mysql_select_db(forum, $link_forum);

$get_userinfo_query = "SELECT username, password FROM user WHERE username='$username'";
$get_userinfo_result = mysql_fetch_array(mysql_query($get_userinfo_query) );
if(md5($password) != $get_userinfo_result[password])
{
print("You entered the wrong username or password.");
}
elseif(md5($password) == $get_userinfo_result[password])
{
print("Your password has been accepted. Now we can move on and display the content of the page.");
}
mysql_close();
?>Is this wrong or something? I'm just getting the wrong password message. I actually wrote this code a long time ago and I thought it worked then.

Can anyone help, please?

Logician
07-15-2003, 07:40 AM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=54875" target="_blank">https://vborg.vbsupport.ru/showt...threadid=54875</a>

just in case it may save you creating an interface from the ground.

if you are determined to stick with your own code, try to put:

$password = $HTTP_POST_VARS['password'];

at the begining of your post. It is probably a register_globals issue.

briangrapes
07-15-2003, 03:26 PM
Eh, nevermind. I got an answer over at vbulletin.com that helped me. Thanks anyway.