-1

I'm relatively new to mysql and I'm having trouble creating a website where a user registers and has access only to their private information. So far I have created a login/registration page that's linked to my mysql database using php and it works just fine. Every time a user registers, their userid, username, email, and password is inserted into my database.

The only problem is I don't know how to make each user have their own private info such a contact list filled with names, numbers, and emails that they can change on the frontend once they have made an account.

I was thinking about making a mysql table each time a user makes a new account, but from other stackoverflow posts, I learned that it was a bad idea. It stated that I should just have one giant table with all the users instead of separate tables. But I don't know how to do this and have each user have their own separate data. I have researched this for weeks and couldn't find anything online so I made this stackoverflow account to ask.

I also want to mention that I'm using the mysql command line in cloud9 ide so I can't use wordpress and I also plan on using Django.

Thanks a lot in advance.

  • So store data in a table with the userID as the owner or whatever, then when you show some page that all users can access, you get the data from said table where their ID = ID in the table – James May 21 '18 at 00:38

1 Answers1

1

I think you need to step back from this a bit, especially because using Django means that your easiest approach will be to use its Object-Relational Mapping api to handle the database.

Django is a Python web framework that gives you both database management and provides views to make things like login pages and user management easier. There would be no particular reason to use PHP (and it would be confusing to do so) in concert with it.

I'd suggest taking the tutorial for a spin first.

Benjamin Hicks
  • 756
  • 3
  • 7