I think this is what he was asking for : (reusing Vooler's code from above) <?php if(empty($_POST)) { ?> <form method="post"> File Name <input type="text" name="name"><br> Page Title <input type="text" name="title"><br> Content <input type="text" name="content"><br> <input type="submit" value="Create"> </form> <?php die(); } $name = $_POST['name']; $title = $_POST['title']; $content = $_POST['content']; $sanitized_name = preg_replace('/[^0-9a-z\.\_\-]/i','',$name); if ($sanitized_name == $name) { $data = file_get_contents("templates/file1.html"); if(get_magic_quotes_gpc()) $data = stripslashes($data); $data = str_replace("{REPLACE_TITLE}",$title,$data); $data = str_replace("{REPLACE_DATA}",$content,$data); write_file("output/$name.html",$data); } else { echo "Filename problems. Try ".$sanitized_name; exit; } function write_file($filename,$data) { $f = fopen($filename,"w"); fwrite($f,$data); fclose($f); } ?> PHP: requires one change to the template file file1.html : <html> <head> <title>{REPLACE_TITLE}</title> </head> <body> <b> {REPLACE_DATA} </b> </body> </html> PHP: Should be a basic page creator from a template. Took the code for the filename check from here : http://www.webmaster-talk.com/php-forum/119541-check-if-enterd-name-valid-filename.html
ok so basicaly, imagine it as a artical submitting script. and there being 2 forms, the 1st one is the title of the artical, so text inside this gets submitted to being the title of the page. Then the second box becomes the artical, and is submitted in the center of the page allong with it at the end of the page goes the author and the text displayed is Author + $vbulletin->userinfo['username'] PHP: The page will then be created under the dir, as form1 artical tittle dose this make sence? also if it could be made to to write over existing files it would be good.