user area help!

They have: 1 posts

Joined: Dec 2005

Im setting up a small user area for around 5 users. I've already got everything working and the user area is based on 4 tables in phpmyadmin.

I want to make a new database for each user exactly the same as this with the same tables and fields just a different name obiously for the database.

Then i need each user to connect to their database when they log in, how can i achieve this?

Thanks for your help

He has: 113 posts

Joined: Jul 2005

that sounds like a very complicated system and i don't think you have thought it through correctly.

You shouldn't really assign everyone a new database because you could have hundreds of people using it. I suggest reading up on Database Relationships and structuring and finding a way to develop it on that principle using only one database.

It would be more efficiant that way for starters. Also don't foget that unless your on your own web server, your host will restrict how many mysql database you can have because they won't want to clutter up their server.

HOWEVER, if you are talking about just having your own seperate database for a set of fixed users (ie a total of 5 in this case), you can manually create the databases from phpmyadmin and duplicate them in there. Then at runtime decide which type of user is logged in and modify the connection string accordingly.

sorry if this is a bit techo mumbo jumbo.

I'm not entirley sure which way you are attempting to do things.

They have: 3 posts

Joined: Dec 2005

I agree with Neutron2K

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.