Okay I guess I'll jump right into this. I'm new at PHP. I was asked at work to setup an online form. Once the user fills out this form it should do 2 things.
A) Display an html version of the completed form that the user can print out.
Email that same html version to administrator so she can print it out for her own records.
Now that means I've had to start learning and experimenting with php from scratch. I've gotten as far as figuring out how to get the form to pass the information I need. I know how to make the script produce an html page with the finished form for viewing. But I'm stuck when it comes to emailing the completed html page to the administrator.
I've tried using mail() but it can only handle plain text or string messages. I need to be able to send the html by email to the admistrator which I can't do, even if I configure mail() to send html emails. The problem is that I can't just plunk my script into mail(). So I'm at a loss of what to do. I need some help.
Can anyone point me in the right direction of how to accomplish this? Is there an alternate way to send email through php that will allow me to use my code? Or is there a way for me to create the html file as an attachment and send that instead?
I've got two versions of the code. One is a mix of html and php. The other is just using php to spit out everything. They're not terribly long, only 70 lines each, but I wasn't sure if it was too long to post so I'll wait to see if anyone needs it.