Page 1 of 1

Help with PHP for emailing a form

Posted: Mon Aug 17, 2009 2:54 pm
by evrman
I have a client that needs an online credit application. What I have is a fairly complex form that I did in HTML, but relates to a PHP file that sends the info via email to the client. This part works fine but I am trying to understand how and what to add so that the form appears in the email similar to how it looks in the form rather than just simple text.

Would I need to set up another PHP file with HTML to structure what is sent or can it be done in the same file?

Is there an easier way to do this I might be overlooking?

I'm trying to avoid having to set up a database or anything more complex than a few pages of PHP and HTML.

Thanks!

Re: Help with PHP for emailing a form

Posted: Mon Aug 17, 2009 3:58 pm
by jackpf
I'm not sure what you mean...

You want stuff like input boxes in the email? If so, you have to send the right mime types (text/html) in the email headers.

Re: Help with PHP for emailing a form

Posted: Tue Aug 18, 2009 8:30 am
by evrman
I just want a similar table structure to what I have in the html version of the form, so the client can read it easier. Is there a way I can add the proper html tags for the table into the PHP? I'm not familiar with how to do that.

Re: Help with PHP for emailing a form

Posted: Tue Aug 18, 2009 8:38 am
by jackpf
Oh right. Well, if you want to email html, as I said, you need to send the right mime types for it to render.

This might be useful.

Re: Help with PHP for emailing a form

Posted: Tue Aug 18, 2009 9:41 am
by evrman
Thanks for the help! I really appreciate it!

Re: Help with PHP for emailing a form

Posted: Tue Aug 18, 2009 9:44 am
by jackpf
No problem :)