RE: [PHP] Permenant Page Generation

From: Date: Sat, 08 Feb 2003 23:33:51 +0000
Subject: RE: [PHP] Permenant Page Generation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134910@lists.php.net to get a copy of this message
> I would like to create two pages using the fwrite() and fopen() > variables...btw I am a newbie: > > One form page to enter information. I've done that and used the same > format as a typical html page. method="post" action="submit.php"> > > I want the second page to show the information was submitted and have the > information create a permenant html page named after one of the text areas > on the page. > > I guess this will lead to three pages because i will have a template set > up for the created page to look like the pages that have already been > created by static html. > > In effect...the user will physically upload a file to an intranet server. > Next go to the form page and add the information on the file they just > submitted to the server. Once that information is added and the submit > button is pressed, it will trigger a html page to be created with the info > submitted. Help! Assuming $_POST['text'] would contain what is in your text area, writing it to a page is as simple as this: $fp = fopen('filename.html','w'); $fwrite($fp,$_POST['text']); fclose($fp); How easy is that? Have you even read the manual pages on fopen() or fwrite()?? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#134910) next »