G
G
Gumus1719912022-03-31 21:47:24
Web development
Gumus171991, 2022-03-31 21:47:24

How to store variables from the site admin?

Let's say I have a bunch of levers in my admin that can be either true or false. How to store these values? In db, it seems like this is wrong.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
ThunderCat, 2022-03-31
@ThunderCat

In db, it seems like this is wrong.
Depends.
If these settings are common to all accounts, then naturally only in the database.
If these are the settings of a specific user of the admin panel, which should work from any device - also in the database, for example, as a json in one field of the user settings.
If these are local settings, like a dark theme or some other visually insignificant crap, you can use cookies. But basically database is the most logical method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question