vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Using the VB member database outside VB (https://vborg.vbsupport.ru/showthread.php?t=55286)

briangrapes 07-14-2003 04:37 PM

Using the VB member database outside VB
 
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:
Code:

<?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 06: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 02:26 PM

Eh, nevermind. I got an answer over at vbulletin.com that helped me. Thanks anyway.


All times are GMT. The time now is 11:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01585 seconds
  • Memory Usage 1,709KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete