Here’s what I need to do:
Make a backend for a client that allows them to change some simple words in one of their web pages.
I want to do this with a form. When they submit it, I want the changes to occur on the site.
I’ve done a lot of reading, and as far as I can tell, I need to somehow write these variables to a file, and then use include() to get them into the final page. Is this correct?
So my problem is, I want to output all of these variables to a text file that php can read in all at once, so it will look something like:
$varToStore1 = "String Value1";
$varToStore2 = "String Value2";
$varToStore3 = "String Value3";
That way when I use include(“thatTextFile.txt”) in the final page, it will basically load those variables right?
What I can’t figure out is how to write such a file with PHP. I know how to write files, append them, etc. But I don’t know how to get the proper string output. Like how do you output quotes? PHP just freaks out on me.
If my way seems weird, it prolly is, so can you recommend a better way to do this template type thing? Thanks!