Web Hosting Talk







View Full Version : sharing the same database


Uncle Mad
03-06-2005, 12:24 AM
Hi

Say if i were to setup a personal website, that includes these.
* image hosting
* forum
* possibly some other scripts that user can sign up themselves

In this case, if i install them separately, they'll have their individual database. I'm trying to create a web portal, such that they can login from the main page, and then they can get access to the services as listed above, without logging in again. It's a one set of username and password for all the services.

I believe if i want to do so, i'll have to share one database between all the scripts.

Question here is, how can i do so? Do i simply edit the script, and have their connecting database name, to one single one? Anything else i have to do?

Then how can i create a page using HTML, such that they not only allows the visitor to sign in, but directed to a new page that allows them to choose which software they want to use?

Definitely, the user should be able to login to just the script itself, through their respective index page.

Hope there are kind souls around. :)

Uncle Mad
03-06-2005, 02:50 AM
Anyone can give some advice?

zupanm
03-06-2005, 09:07 AM
if you are downloading these to use.. you'd have to hack some code so you use one of their login systems for the other 2. Most major webapps now seem to support a prefix before their table names just in case a user only can create 1 database.

Uncle Mad
03-06-2005, 11:10 AM
For the first part, any reference site for me?

On the latter, does that mean, i cant use a single database for all 3?

zupanm
03-06-2005, 12:50 PM
there really is no reference.. you'd have to know php and figured out how they are doing their login stuff.

the latter like php will ask for a prefix to install its tables.. like phpbb_users.

then maybe another one will ask.. so it installs its users table like webapp_users.. so you can have webapps using the same database.

Uncle Mad
03-07-2005, 02:13 PM
thanks.

so does that means, i use the same sql database, and they users signing up for one of the service, can login with the same username throughout?

let's leave the login part alone.