I most certainly agree that storing this type of data in a database would be the easiest way, but if you consider the fact that is a school project and that we have to develop systems/sites that are "scalable"(..eh...) = can work "smooth" with 1000 users(++), I believe that approx 200.000 messages(10010002(in/outbox)) would slow down the site performance if every user has to send a query to the db ?
..or am I on the wrong track here ?
...I am i newbie, so any comments would be appreciated :-)
Here is the function I made to make it work, and by the testing I have managed to do so far(between supper and cigarettes), I believe it works pretty well at least in my case:
function rename_messages($user, $message, $path, $numofmessages){
unlink("".$path."".$message.".txt");
$rnm = $message+1;
for($x = $rnm; $x <= $numofmessages; $x++){
rename("".$path."/".$x.".txt", "".$path."/".($x-1).".txt");
}
Does this seem to be a good solution to any of you guys with experience ??
-please give me some feedback-