Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@hazlin It really depends on the type of data.
If the data is fixed and unchangeable (except for editing the source code of course) (like the HP/attack/defense/speed values of a character), or changed each time you use it (like a contact form), then you can present it as objects, enums, or even variables inside of a function.
If data is changeable by the user (like a comment or a forum post), best is to use a database.
And if data is kind of changeable but not completely (like a list of URLs or a guestbook which can only be appended to), you can use a JSON file, an XML file, a CSV file, or even a plain text file, which you'd open up in the backend, put it into an array, and present it to the frontend.
And maybe make it append-only for some interaction.