Why does multiple attempts at file creation in PHP fail after first success?
<p>I am writing an installer for someone, and most is going well. If I type everything in correctly the first time, everything is just fine. Upon the database info step, if I type something in incorrectly, I achieve an error as expected, and can correct my error to achieve a successful completion. Now, here's the issue. If some step runs incorrectly, and the user wishes to take a step back, or refresh the browser, the file will not be created. The only way to get the file to create again is to run the install via a fresh window.</p>

<p>File to be created: (Database info - settings.php)
    <code>&lt;?php
    $dbhot = "localhost";
    $dbuser = "somedude";
    $dbpass = "giggety";
    $dbname = "blah";
    ?&gt;</code></p>
