I have now spent a couple of months with PHP, getting comfy with working with a database back-end, and now the time has come to try storing and accessing information in files.
In ralation to this, I am looking for information on best practices in regards to both easy access of stored information and being practical in how it is stored (not to mention security). I'm sure there's more than a few trade-of's hidden here...
For example: What is the best way to store database parameters and general account access information? Do you do so, in a long row of constants containing the information? such as this?
define (peter madsen, oux76H9K);
define (rachel stevens, khfMJ747);
Is it more practical to park it in an array indiced by usernames, and then search with a loop from an external file?
$accessinfo["peter madsen"] == oux76H9K;
$accessinfo["rachel stevens"] == khfMJ747;
Which way is the easiest/ best/safest way, to access from an external file needing the information to proceed?
Maybe both of the above are redicilous compared to somekind of simple XML file? (I don't know anything about XML)
I know this is really basic stuff, but I just wanna start off on the right foot, before picking up any bad practices.