Jump to content


Photo

One Form to Multiple Databases


  • Please log in to reply
5 replies to this topic

#1 DontheCat

DontheCat
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 28 August 2005 - 08:41 PM

have this site where I've installed phpBB-Forum, B2evo blogs, A GB and PhpLinks. All of them have their own databases.

I also have a Form where members can register. The Form has Login and PassWord entry fields and the values are stored in the Member master table in a different databse.

Is there someway I could also populate the Login/Password of all the applications on submission of the above form?

Would the member then be able to be "Logged In" while he accesses the different areas across the site? Or would it need a session varaiable or something like that?

Thanks for the support

#2 ChrisDarl

ChrisDarl
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 27 October 2005 - 06:08 PM

Im not sure weather you're allowed to edit their code? Might wanna check it out. Some bits of code i used years didnt allow you to. But it could be done by using one table containing all the users, and instead of calling the users from the individual databases call it from the one table.


Chris

#3 jamiemcconnell

jamiemcconnell
  • Members
  • Pip
  • Newbie
  • 7 posts
  • LocationUnited Kingdom

Posted 27 October 2005 - 06:19 PM

if all of those programs have databases, then i dont see why you dont just loop though each database adding the username/password and any other information to the appropiate tables.
// Jamie!

#4 ChrisDarl

ChrisDarl
  • Members
  • PipPip
  • Member
  • 27 posts

Posted 27 October 2005 - 09:11 PM

that would be using database space that is not required, and will also slow down the loading of the pages slightly, would it not?

Chris

#5 jamiemcconnell

jamiemcconnell
  • Members
  • Pip
  • Newbie
  • 7 posts
  • LocationUnited Kingdom

Posted 28 October 2005 - 10:45 AM

Thats true, but the time taken to query the database is extremly fast, and it would only be happening once per user registration.

If you did want to have a seperate table for members then you would have to go through each program edditing the code, and i can imaagine there would be alot.
// Jamie!

#6 DontheCat

DontheCat
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 28 October 2005 - 11:04 AM

jamie, your solution is the one I tried after I posted this query here. It works. meaning the DBs get populated alright.

But the problem is that the session variable created by my regular Login page does not match the other programs' authentication scripts. I'm forced to change lotsa code especially in phpBB.

Also, changing the login auth script to read from another table apart its own created some other problems.

What I've done is ask the Registering Members to use the same credentials and register separately in each application. Actually, I started developing another time-bound site in the meanwhile and so the earlier one is in temporary cold-storge :-)

Thanks Chris, jamie for the suggests. I'll keep this post updated as I work on a solution. Ideas and more suggestions welcome...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users