Help with PHP for emailing a form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
evrman
Forum Newbie
Posts: 4
Joined: Mon Aug 17, 2009 11:17 am

Help with PHP for emailing a form

Post 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!
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Help with PHP for emailing a form

Post 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.
evrman
Forum Newbie
Posts: 4
Joined: Mon Aug 17, 2009 11:17 am

Re: Help with PHP for emailing a form

Post 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.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Help with PHP for emailing a form

Post 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.
evrman
Forum Newbie
Posts: 4
Joined: Mon Aug 17, 2009 11:17 am

Re: Help with PHP for emailing a form

Post by evrman »

Thanks for the help! I really appreciate it!
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Help with PHP for emailing a form

Post by jackpf »

No problem :)
Post Reply