rename the written text files in numbers, eg. 1,2,3...

ted_chou12's Avatar, Join Date: Nov 2006
Go4Expert Member
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:
$file fopen("$dataf","w");
$write fwrite($file,"not important text");
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's Avatar, Join Date: Jul 2004
Go4Expert Founder
Duplicate of thread rename the text files in numbers, eg. 1,2,3.... in web development forum. Thread closed.