gsnedders
03-26-2004, 03:22 PM
I have a form <form action="" method="">File name:
<input name="filename" type="text" size="30" maxlength="47" />
<br />
<input name="name" type="submit" value="Submit" />
</form>I want to have a script which checks if [whatever they put in the form].php exists in /, if it doesn't, then I want it to create a file in / called [whatever they put in the form].php and a file in /files called [whatever they put in the form].txt, then put in /[whatever they put in the form].php <?PHP
require ('files/topheader.txt');
require ('files/header.txt');
require ('files/[whatever they put in the form]');
require ('files/footer.txt');
require ('files/bottomfooter.txt');
?>
If the file already exists I want the script to echo ('<p class="error">File Already Exist</p>')
<input name="filename" type="text" size="30" maxlength="47" />
<br />
<input name="name" type="submit" value="Submit" />
</form>I want to have a script which checks if [whatever they put in the form].php exists in /, if it doesn't, then I want it to create a file in / called [whatever they put in the form].php and a file in /files called [whatever they put in the form].txt, then put in /[whatever they put in the form].php <?PHP
require ('files/topheader.txt');
require ('files/header.txt');
require ('files/[whatever they put in the form]');
require ('files/footer.txt');
require ('files/bottomfooter.txt');
?>
If the file already exists I want the script to echo ('<p class="error">File Already Exist</p>')