Hi folks,

I am trying to create a script that will take the MYSQl DB details that have been sent from a form and store it in a file for usage at a later stage.

Am I doing this correctly?

PHP Code:
$File "db-settings.php"
$Handle fopen($File'w');

$Data "$dbuser = $_POST['dbuser'];\n"
fwrite($Handle$Data); 

$Data "$dbpass = $_POST['dbpass'];\n"
fwrite($Handle$Data); 

$Data "$db = $_POST['db'];\n"
fwrite($Handle$Data); 

$Data "$host = $_POST['host'];\n"
fwrite($Handle$Data); 

print 
"Data Written"
fclose($Handle); 
Any advice would be greatly appreciated