We\'re developing a website and we\'ve encountered this issue: for this website there are 2 types of users: the customer and an administrator. The administrator can see all prod
I'm rather new to web development myself, but couldn't you have a field in a MySQL table called 'type', with a user either being a 'customer' or 'admin'? When someone logs in, the system could check their user type and if it's 'customer', the system could show the customer's view and if it's 'admin', the admin's view.
You could then also have another field in a table which only applies to 'admin' type users which basically says whether the admin is viewing in admin mode or customer mode. A button on every page in 'admin' view could toggle between 'admin' and 'customer' for this new field, and that can decide what view is shown.
Is that the kind of thing you're looking for?