Jump to content

Archived

This topic is now archived and is closed to further replies.

renno

Generate HTML file - Help

Recommended Posts

I'm wishing to generate and populate an HTML file on the submission of a form but don't know how to approach the problem. I need to click the form submit button which builds a new html file in a specific site folder and for that file to contain or output variables from the submitted form. I don't know if I have to use a sort of template so that the generated file has a predefined layout... If someone knows of a related article or could point me in the right direction, it would be much appreciated.

Many thanks...

Share this post


Link to post
Share on other sites
You could have a predefined template and where your variables are supposed to go. For for example you have something like the following where your variables are supposed to go
{your_var_name_here}
To replace that with the actuall variable use str_replace.

You can create the file too with the use fopen, fwrite and fclose.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.