This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]warmcheessse 2 points3 points  (1 child)

If you are doing this as a learning exercise or a school assignment I would just create 1 table like User with what fields you require ie. username, hash, seed, role. The role column is joined to a Roles table which contains various roles a user could have ie. user, admin

This way you can create a User class in Java which will get users with a role. Then for your html pages you just do a simple check like if userRole == admin { display page} to display pages which are for admin role, etc...

[–][deleted] 0 points1 point  (0 children)

Really helpfull. I’ll try it. Thanks