That shouldn't be a problem.
You use following functions:
unlink(); - To delete the configuration file.
fopen(); - To open a file for in this case, writing.
fwrite(); - To write to the file.
fclose(); - To close the file after you've opened it and written to it.
Something like this...
<?
$file = 'config.php';
?>
<form method="post" action="">
Post:<br>
<select name="post">
<option value="1">Yes</option>
<option value="0">No</option>
</select>
<br>
Log uploads:<br>
<select name="loguploads">
<option value="1">Yes</option>
<option value="0">No</option>
</select>
<br>
Upload max:<br>
<input type="text" name="uploadmax" size="4">
<br>
<br>
<input type="submit" name="submit" value="Submit">
</form>
<?
if($submit)
{
extract($_POST);
$string = "<?\n\$post = '$post';\n\$loguploads = '$loguploads';\n\$uploadmax = $uploadmax;\n?>";
if(file_exists($file)) unlink($file); // If file exists, delete it.
$fp = fopen($file,'a+'); // Try to open file for writing, if file doesn't exist, attempt to create it.
fwrite($fp,$string); // Writing to the file.
fclose($fp); // Close the file.
}
?>