denoteone Posted August 28, 2007 Share Posted August 28, 2007 I am a beginner at php...so bare with me. I have a PHP script that gets data from a form and sends it to an email address. Got that working no problem. now I would like to take the data form the form and instead of just emailing it I need to put it into a template that I have created using html and tables and then emails this template to a specific email address. ??? Is this possible and for a beginner is it practical?….any help would be cool thanks Quote Link to comment https://forums.phpfreaks.com/topic/67061-data-from-a-form-to-a-template/ Share on other sites More sharing options...
lemmin Posted August 28, 2007 Share Posted August 28, 2007 All you should need is file_get_contents(). The easiest way for you to do this is to split your template into two files. One is the header and there other, the footer. Use file_get_contents() to read the header, concatinate the form data to that string as you would have put it in the email, then use file_get_contents() again to put the footer at the end of the string. If you are attempting to put individual pieces of data into table cells, it is definately better to create the table at run-time. Quote Link to comment https://forums.phpfreaks.com/topic/67061-data-from-a-form-to-a-template/#findComment-336291 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.