I have a page with a form.
The layout of the form is very important to have a good overview.
When clicking submit, I want to email the form through the mail() function. Now, that's not a problem to do of course. But the tricky part is that I want the filled in form to be sent as an attachment with the email.
The reason for that is that the layout remains the same in the attachment and the people the mail is sent to, can easily print the form and see the filled in form properly (no plain text).
Can this be done through PHP? Any help appreciated!
mail() + filled in form as attachment
Moderator: General Moderators
-
sunilbhatia
- Forum Newbie
- Posts: 2
- Joined: Tue Feb 10, 2004 1:14 am
- Location: India
Hi,
What you can do is to create the form and store in the variable like this
$msg = "<form action=post method='http://URL/formprocessor.php'>
......
</form>";
And then mail it to the address you want to like this
@mail($toemail,"Subject Line",$msg,"Content-Type: text/html\r\nFrom: Your Name <your@email.com>\r\n");
The user will get to see the same form in his client, which when he fills the data will be made available to your URL in the action attribute of the form
Hope this helps
Thanks
Sunil
What you can do is to create the form and store in the variable like this
$msg = "<form action=post method='http://URL/formprocessor.php'>
......
</form>";
And then mail it to the address you want to like this
@mail($toemail,"Subject Line",$msg,"Content-Type: text/html\r\nFrom: Your Name <your@email.com>\r\n");
The user will get to see the same form in his client, which when he fills the data will be made available to your URL in the action attribute of the form
Hope this helps
Thanks
Sunil