Forum Moderators: coopster

Message Too Old, No Replies

user accounts

         

chinny

3:55 pm on Jan 16, 2006 (gmt 0)



I'm desigining a website using php/mysql which has user areas for clients to upload information and details into their respective user areas.

Each user will have their own directory in the site based on their own database with the exact same tables, fields etc, the only difference is the 'connection.php' will be different for each user as it will connect them to their respective database.

I then plan to have a login based on a members table which will redirect user/pass combinations to the relative directory.

What i want to know is, is there a way that insteadof having seperate directorys for each user, when they login the respective 'connection.php' can be loaded for the user eliminating the need for directorys for eachj user.

thanks guys

coopster

3:10 pm on Jan 17, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, chinny.

If the users are uploading any type of content then you have two choices -- store their uploaded files in the filesystem (directories) or store them in a database.

One other idea may be to have a hybrid. A single database for all with userid as PRIMARY KEY but one of the tables (or a column in the user information table) could contain the directory specific to that particular user.

henry0

4:31 pm on Jan 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Creating a dir per user:
If you allow for img uploading and editing
I suppose that you are integrating an editor
if so the editor stores img in a temp dir then the final img in a dir
at this point if you do not want user-a to see and access user-b img you will need to tweak the editor's script in order to create a new img-dir per new user
and load in your DB the dir link tied to user's authentication, this is more secure and more organized.