i had an UBB forum, but i made my own, know all people have created again their accounts and i need to put the number of post they had before.
Every user had a file with their data called 0001.cgi, 0002.cgi, etc...in the 8 line was the number of posts of that user.
So i need to do a script that does something like this
for($i=1;$i<=total_files; $i++)
{
open file $i.cgi for read;
$user=read 1st line;
$posts_old=read 8 line;
update posts=(posts+$post_old) FROM table WHERE user='$user';
close file;
}
I know this isnt perfect but the idea i need is , how to open the $i file. And how to access the data from 1st line and 8 line.
Thanks