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?
$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?