S
S
senpay12015-09-23 07:58:24
symfony
senpay1, 2015-09-23 07:58:24

PHP "single data" storage - where?

I have the following data that I don't know where to store:
Form fields that should be displayed on the user page and set in the admin panel.
Here is the moment, where to write them down after the administrator has created a certain form?
Here, as it were, it is necessary to store an array, perhaps, with the form:
array( [type => label], [type => label], [type => label] )
Is it logical to use NoSQL solutions here?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Max Payne, 2015-09-23
@YardalGedal

IMHO, I would keep it in the json line in the file, parse it from there and decode it into an array. No more is needed here.

T
TyzhSysAdmin, 2015-09-23
@POS_troi

I'm not very strong in PHP, but I don't see the point in nosql.
Saved to the database and then generate your form, it's another matter if each user has their own form and there are a lot of such requests, then you can think about it.

A
Alexander, 2015-09-23
@nanocat

The very first option that came to mind is to export the data to a php file using the var_export function. Other options are csv (eg fputcsv), json (json_encode) files. Or you can serialize with serialize. This is in case there is not much data and it makes no sense to start a database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question