Jump to content


Photo

Combining database usernames?


  • Please log in to reply
5 replies to this topic

#1 rho42

rho42
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 30 March 2006 - 09:39 PM

Hi, I am making a website that will have a marketplace with products to purchase and a phpBB community. I was wondering if there is a way to combine the usernames and passwords from both so users only have to sign up for one and have access to both. Is this possible?

#2 realjumper

realjumper
  • Members
  • PipPipPip
  • Advanced Member
  • 399 posts

Posted 30 March 2006 - 09:54 PM

I'm guessing that you are using 2 databases.....one for the phpBB and one for the marketplace? If that's the case, why not just add the tables you require for the marketplace application into the the phpBB database? Then you will have one database with all the tables you require to run both applications, and only have to authenicate users once? That's what I would do anyway. :-)

#3 Guest_footballkid4_*

Guest_footballkid4_*
  • Guests

Posted 30 March 2006 - 10:29 PM

I'm fairly unfamiliar with the phpBB authentication...I don't know if they simply encrypt with md5( $pass ), or if it is more complicated, I know IPB uses md5( md5( $pass ) . md5( $salt ) ), but that won't help you here. After you find the authentication method, all you have to do is select from the phpBB tables instead of your tables...

#4 rho42

rho42
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 31 March 2006 - 01:42 AM

Ah ha.

I see I will have to learn more shit now.

#5 High_-_Tek

High_-_Tek
  • Members
  • PipPipPip
  • Advanced Member
  • 72 posts

Posted 31 March 2006 - 02:27 AM

<?php

$pass=md5($_POST['pass']);

$sql=mysql_query("SELECT * FROM phpbb_users WHERE username='$_POST[user]' AND user_password='$pass');

?>

Simple

Passwords are encrypted with md5() once

#6 neylitalo

neylitalo
  • Staff Alumni
  • Advanced Member
  • 1,854 posts
  • LocationMichigan, USA

Posted 31 March 2006 - 04:56 AM

If I were you, I'd just have the customers register with phpBB, and have your marketplace script use the phpBB table(s) - don't have any user authentication tables in your marketplace system.

Although, I must say, it may be a bit more trouble than it's worth - all of my experience in integrating databases was not fun at all.

http://nealylitalo.net - My personal website, and home of The Netizen's Journal.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users