I am new to PHP, and I am trying to make a setup page, that will check if the website has been setup via the setup.php file. When the user is redirected to the setup file, they have to input the database details into a HTML form, which will then change the database connection in the config.php file.
How can I write in PHP, to check if the website has been setup? (I thought maybe a boolean could solve this problem)
And,
How can I make a HTML form that will change the mysqli database connection to the details given in the form? (I think maybe the str_replace() function could do this, but I simply do not understand it)
Thanks in advance,
Unique
EDIT: Added Links, setup.php - http://pastebin.com/gHn6ASRg
config.php - http://pastebin.com/B5uApy1F