![]() Topic awaiting preservation: can't print variables in HTML mail from PHP formmail (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: |
![]() I have written a formmail in PHP, and I make the email I recieve an HTML mail, by specifying the appropriate headers in the formmail script. But a problem has arisen that I can't seem to figure a way out of. I can't figure out a way to print the fields that a user submits in the form to the email. I'm not sure why. Take a look at the code at http://66.34.243.107/contact.txt . When I recieve the email, the variables and stuff look like |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() I don't think php recognizes the message as one string. |
Nervous Wreck (II) Inmate From: |
![]() Hmm, so far, nothing has worked. I tried GRUMBLE's suggestion a few times, but it's rather odd because with double quotes around the message, it didn't work, and with backslashes before the quotes, in my inbox it didn't even execute any of the html there. The EOF thing didn't work as well, but thanks a lot guys!! |
Paranoid (IV) Inmate From: Lebanon |
![]() Hello, code: // Read the mail file
|
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
![]() Did you get this fixed? Here's a function I wrote and use in a separately included file. It gathers all form fields and returns a string that contains all the key/value pairs (except for Submit) in a well-aligned format, and adds IP information. Check it: code: function gatherOutput() {
code: $emailRecipient = "xxxxx@umn.edu, xxxxxxx@tcsu.umn.edu";
|
Nervous Wreck (II) Inmate From: |
![]() Jiblet, that script works to an extent. the only thing that ends up in my mailbox is the IP address and for example, 'Form Submitted by: 60.60.6.60 aka '. do I have to modify any parts of the script? thanks. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() Also if you are only using this on a local box that is not named the IP is all you'll get. |