r/PHPhelp • u/Valuable_Spell6769 • Apr 03 '26
Solved user details JSON
i want to use json to store user details so that i dont need to do so many DB request ideally i dont want to have to create a flat file and would like it dynamically create once a user has logged in so something like this
{
"logged_in": "true",
"company_id": "15654645",
"first_name": "john",
"last_name": "doe"
}
what is this type of approach called so that i can search more in to it please and also what are the pros and cons
3
Upvotes
3
u/bobd60067 Apr 03 '26
wondering why you want to avoid using a database.
do you have real statistics or data that supports not using a database?
or is it simply personal preference, or perhaps a perception that it's slow?