to descent a directory, simply in the path, put a ../ - for example
directory1
directory2
file1
file2
If i am in directory 1, then to get to file1, i would just go...
../
but if i wanted to go into directory2, i would go...
../directory2/
if you get what im saying 🙂
i dunno the code to write to HTML files. its exactly the same as writing to text files though...
http://uk2.php.net/manual/en/function.fwrite.php
and just go from there 🙂
hope this helps