store the themes names in database, (it gives you a theme_id (PK))
and make a dropdown menu for the users to able to select, and store that in the user's table: (FK) theme_id
On login you select the theme folder with the (FK)theme_id from the themes table, and store its values into SESSION OR cookie then.
And use default theme for unregistered users.
Hello, jjozsi.