Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   rename the written text files in numbers, eg. 1,2,3... (http://www.go4expert.com/forums/rename-written-text-files-eg-123-t2179/)

ted_chou12 9Dec2006 21:21

rename the written text files in numbers, eg. 1,2,3...
 
what i want to do is when the visitor fills out the form and press submit, i want to store the information as a text file, and call it "text1.txt", when the second visitor comes and submit another form, I want the second form to call "text2.txt", and so on.... continues to name it in accending numbers, below is my code:

PHP Code:

<?php
$dataf 
"1.txt";
$file fopen("$dataf","w");
$write fwrite($file,"not important text");
fclose($file);
?>

What code do I insert in if i want to rename the $dataf text file in numbers, eg. 1,2,3... in sequence, each time creating a new file with a interger above the last one written?

shabbir 10Dec2006 12:27

Re: rename the written text files in numbers, eg. 1,2,3...
 
Duplicate of thread rename the text files in numbers, eg. 1,2,3.... in web development forum. Thread closed.


All times are GMT +5.5. The time now is 19:58.