How to Generate "config.php" via PHP Form?
<p>I'm building a small php-based application which requires a "config.php" file containing a username and password. Rather than requiring the end user to modify "config.php" manually before they upload the application to their server, I would like to dynamically generate "config.php" from a setup form. </p>

<p><strong>Basically, I'd like to use this:</strong></p>

<pre><code>&lt;form method="POST" action="?setup-config"&gt;
&lt;fieldset&gt;
    &lt;div class="clearfix"&gt;
        &lt;label for="username"&gt;Desired User Name&lt;/label&gt;
        &lt;div class="input"&gt;
            &lt;input type="text" name="username" id="username"&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="clearfix"&gt;
        &lt;label for="password"&gt;Desired Password&lt;/label&gt;
        &lt;div class="input"&gt;
            &lt;input type="password" name="password" id="password"&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="actions"&gt;
        &lt;input type="submit" value="Save Username &amp;amp; Password"&gt;
    &lt;/div&gt;
&lt;/fieldset&gt;
&lt;/form&gt;
</code></pre>

<p><strong>to create "config.php":</strong></p>

<pre><code>&lt;?php

$username = 'entered username';
$password = 'entered password';
</code></pre>
