Re: CREATING A FILE with a TEMPLATE

From: Date: Thu, 17 Oct 2002 16:43:46 +0000
Subject: Re: CREATING A FILE with a TEMPLATE
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-120358@lists.php.net to get a copy of this message
sorry to keep bothering.. but still have questions...and may be explaining better you could help me... here i include my php code and the template file to be read... i want to create a new file ( in the .php is $value for that $key=Registro_nro ) well in the right case it would be COPY the template and rename the file template.htm to $value.htm and inside the new $value.htm replace all ##vars## ( understanding that ##vars## is an example ) that in a time will be = to $key with the $value for that $key... Example.. i filled the form : Name : Kevin Surname : Fradkin ID: 111111 -------- the php...----> foreach( $HTTP_POST_VARS as $key => $value ) copy template.htm to 111111.htm open 111111.htm and : if $key = Name replace ##Name## in 111111.htm with $value if $key = Surmane replace ##Surname## in 111111.htm with $value etc.. hope you understand my point... Thanks a lot! Spooky.. PS: Sorry to send the attachment... i don't know if it allowd or not... but in case isn't... i apologize!...and never doit again..

« previous php.general (#120358) next »