"Copy" a php-file and include the POST-variable
<p>I work on a PHP-app with some live functions etc. I have created a PHP script that does the following:</p>

<ul>
<li>Based on a form input, it creates a folder with the input name, eg. JOHN. (called $dir)</li>
<li>It then creates a MySQL database table with the name the prefix_JOHN.</li>
<li>It then copies and moves the system templates files to the JOHN-folder.</li>
</ul>

<p>Then my problem is - I need script to create two files with a specific content - but the variable called from the form input must be included so it calls from the specific (here) JOHN-table in the database.</p>

<p>I tried just to copy - but it requires to manually edit the file. As there'll be unlimited tables created, I don't want to do this. :)</p>

<p>I then tried to make the script create a new file. Worked - except it can't include PHP-variables or tags - which makes sense, of course, but I am stuck now. :(</p>

<p>Can anyone help?</p>
