Ok, a couple more questions...
Question #1: Can I set the script to overwrite what was previously on the files created by this script each time it's run.
Example: The script creates the file username.html and writes "hello world" to it. The next time the script is run, it overwrites "hello world" instead of making the file say "hello worldhello world"
Question #2: How can I include content from my database within the content of the files being written? I need to do something like the code below, but it obviously won't work with the way the script is currently written.
function create_file($file){
$fp = fopen($file, "a");
fwrite($fp,"$row['userinfo']");
fclose($fp);
}