For the intranet index.php and other pages, I include this config file at the top then just have $status" />
For our intranet, I have a php settings file (which I have appropriately named config.inc.php) and values from here are passed to various areas of the site (such as internet status etc). When we want to change the status, we modify the text in this settings file and this works well.
For the intranet index.php and other pages, I include this config file at the top then just have $status[x] echoed at the appropriate location.Code:
However, I was wondering if it is possible to be able to add an "edit" button next to the text (this would only be visible and editable by admins) and to be able to edit these values via the web interface?
I have no problem doing the actual button and only allowing admin access to it, but what kind of php code is needed so that you can have a text box and submit button which will write back the values to the respective entries in the text file?
Ideally, an edit button would be next to the status text on the intranet, clicking this turns it into a text box (or similar) where you can amend the text, then a save/submit button passes this back to the config.inc.php file and saves that.
We're not fixing something that is broken, rather if possible making it easier to edit the text on the fly!
If settings were in an INI File format / XML Format (personally, would go with INI) you could do this easily with the PHP INI funcs.
There are currently 1 users browsing this thread. (0 members and 1 guests)