I have a web form for installing an application where users submit there sql credentials and server etc. I want to take that data and write it out to a config.php like:
$_MYSQL['server'] = '';
$_MYSQL['username'] = '';
$_MYSQL['password'] = '';
$_MYSQL['database'] = '';
on the fly based on what they submitted to be included in other files later. Problem is I don't want to write user submitted data out to a php file, that is obviously insecure. How can I do this safely?