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.
Basically, I'd like to use this:
<form method="POST" action="?setup-config">
<fieldset>
<div class="clearfix">
<label for="username">Desired User Name</label>
<div class="input">
<input type="text" name="username" id="username">
</div>
</div>
<div class="clearfix">
<label for="password">Desired Password</label>
<div class="input">
<input type="password" name="password" id="password">
</div>
</div>
<div class="actions">
<input type="submit" value="Save Username & Password">
</div>
</fieldset>
</form>
to create "config.php":
<?php
$username = 'entered username';
$password = 'entered password';
frwite()