renno Posted August 24, 2006 Share Posted August 24, 2006 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... Link to comment https://forums.phpfreaks.com/topic/18540-generate-html-file-help/ Share on other sites More sharing options...
wildteen88 Posted August 24, 2006 Share Posted August 24, 2006 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. Link to comment https://forums.phpfreaks.com/topic/18540-generate-html-file-help/#findComment-79839 Share on other sites More sharing options...
renno Posted August 24, 2006 Author Share Posted August 24, 2006 Thanks very much... Link to comment https://forums.phpfreaks.com/topic/18540-generate-html-file-help/#findComment-79843 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.