I have a website and an administrator panel. I need to take some data from the administrator panel fields and show it on the homepage.
For example: on the homepage there is a text block and on the administrator panel there is a input form. I fill it in, press submit, it saves everything (shows current text on form and on homepage). With a database it would be very easy, but this time I can’t use database. Is there any alternative choice that I could use instead of saving it to a database?
You can store data in a flat (normal) text file, and later retrieve it using the
file_put_contents()andfile_get_contents()functions.If you compile the details you wish to store into an array, you can then use
serialize()to convert that array into a simple string, which would make it alot easier to store more than one piece of information with the text files mentioned above.That being said, a database is often the best solution for storing alot of data (as the name would suggest), so if that requirement/limitation can be revisited, all the better.