I understand that one can have their database host, user name and password inside a php file like so...
Code: Select all
<?php
$host = 'some host';
$user = 'some user';
$pass = 'some password';
?>
But, I want to be able to update this information later through a PHP page. From a script that I purchase, I noticed that they kept their database connection information in a XML document. I don't know XML at all so I wouldn't even know where to begin that way, but is their a way where I could place the hostname, username, and password in a regular text file and read it and update it later?
I am trying to prevent from having to edit the actually php file to update database connection information or is it just better to do it the inline php way?