Quote Originally Posted by kows View Post
the script you posted already does what you want, you just need to add entries to replace the username/category. look at how str_replace() is used in the script you posted to find out how to do that.

if you want to change the path to where the file is saved, look at the path being used when write_file() is called. change that to include the category, like: "walkthrough/$category/$name.php".

for a random name that will NEVER be used again, you could define $name as the function time(). this will be unique to a point, but is probably not the best way to do it. the filename will be a number representing the time. you could use md5() too, but that would be 32 characters long. and even worse looking for a filename.

and finally, if you want the created file to have extra stuff in it, you need to add whatever you'd want to the template file (walkthrough/templates/file1.html). the script doesn't do that.

as a last note, doing what you're trying to accomplish using files is ugly and very difficult to maintain. you could accomplish this much, much easier using a database solution.
Yh, the code above was written my a past admin of the site. tbh im not a php coder im a vb one. And i understand just how enoying it is when someone just posts asking for you to do all the work for themwith no sighn of attempt them selves, yet on this occashion. . . i realy am just conhuffled on doing it. and not knowing the language dosent help .. .

If someone could do me this id be realy happy lol, and trust me when i say, i will learn allot from it, and will analyse the script so i understand it, and wont have probloms with it again

Thanks

- Paul