I need some help here. I'm using a form to allow some users to build a table of information. When they click the 'submit' button, they preview the table they created next, correctly formatted, for QA. After they are sure it is right, the next step is to write a portion of that file (the table code itself without all the other html formatting code) to a directory. How do I capture the table code from the source and write it to a file. In the past, I've opened a remote file, used eregi() to remove the code I needed, and wrote that to a new file. But, since I need the code in the current file I'm looking at, I'm not sure how to capture that and write that to a new file. I'm assuming that I need it in a variable somehow? Since I'm passing params to the preview page to build the preview of the table of information through the URL, if I call $PHP_SELF, it shows the file without the table 'cause it has no info to work with. Any suggestions?