I have been making a PHP news script. I would like each entry to be in its own file. The question is how do I have the PHP precessor check to make sure that the filename is not already in use.
For instance, the first entry is 1.txt the second entry is 2.txt, and so on and so forth. After working with many do, while, and if statements, I have yet to figure out how to have the processor check and give the news entry the next consecutive number.
Question 2:
Let's say that I have a text file that looks like this:
username
password
dateposted
post
How do I read this all in to something like an array so that the username becomes $username, and password becomes $password, etc.
Question 3 (quick):
How do I use PHP to delete a text file totally.
Thanks in advance!
Embermage