'site', 'admin' => 'admin', 'email' => 'email', 'url' => 'url', 'dir' => 'dir' ); $config_array = array(); $errors = array(); foreach ($required as $config_name=>$post_name) { if (!isset($_POST["$post_name"]) || trim($_POST["$post_name"]) == '') { $errors[] "Missing $post_name"; continue; } $config_array["$config_name"] = addslashes($_POST["$post_name"]); } $coded = 'Coded by Erm'; if (!empty($errors)) { echo "
"; echo "You must fill in required fields!
"; echo "Return to the Setup Page.
"; echo implode($errors,'
'); echo "
"; die("
$coded
"); } $fh = fopen ('conf.php', 'w'); fwrite ($fh, '$config_value) { fwrite($fh,"// $config_name\n"); fwrite($fh,"$config_name = \"$config_value\";\n"); } fclose ($fh); ?>