Jump to content

Creating a unique 'control panel' for each user


tomhoad

Recommended Posts

Hi there,

 

I'm thinking of designing a site that will allow users to sign up and have their own unique 'control panel'.

 

I just need some pointers on the logic behind this design, specifically:

 

  • How can I create a 'unique' area for each user upon signup
  • Is it possible to link that area to a subdomain e.g. username.domain.com
  • How would the database design look? Would you recommend a database per user, or a table per user, etc.

 

Thanks a lot for any help, I really appreciate it. I've always had excellent responses through this community so thanks for that as well.

 

Cheers

I wouldn't recommend creating a subdomain for each user. Basically, each user should have their own user id. So your user database table could look like this:

 

USER

user_id

name

dob

email

password

 

When a user logs in correctly, you could select their user_id, store it in a session variable like so:

 

$_SESSION['user_id'] = $user_id;

 

From there on, just user that user_id session variable to define who the user is and track his/her actions.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.