Topic awaiting preservation: can't print variables in HTML mail from PHP formmail (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: |
posted 12-22-2001 00:34
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 |
posted 12-22-2001 00:46 |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 12-22-2001 11:05
I don't think php recognizes the message as one string. |
Nervous Wreck (II) Inmate From: |
posted 12-22-2001 15:52
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 |
posted 12-24-2001 09:57
Hello, code: // Read the mail file
|
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 12-26-2001 20:10
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: |
posted 12-30-2001 04:26
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 |
posted 12-30-2001 09:33 |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-30-2001 21:12
Also if you are only using this on a local box that is not named the IP is all you'll get. |