I'm making a setup page where people can write their database login etc and that will then create a config.php file on their webserver with the info but obviously I can't just write
$file = fopen("config.php", "w");
fwrite($file, "$dbName = $dbName");
I actually tried
$file = fopen("config.php", "w");
fwrite($file, "$" . "dbName = $dbName");
But that doesn't work either.
Any way to store it as a PHP variable in a file I write using PHP?