Forum Moderators: coopster

Message Too Old, No Replies

PHP Form Results w/Line Breaks

         

ControlZ

9:05 pm on Mar 2, 2004 (gmt 0)

10+ Year Member



Does anyone know how to code a form so when the results are read via email, there is a line break between each field result?

Have a client complaining that her (php)form results that are sent to her via email appear jumbled together and are difficult to read. I thought it would appear cleaner if I were to somehow include a line break between ea. result presented.

thanks...........

DrDoc

12:52 am on Mar 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



\n = newline

Foo\nbar

would result in

Foo
bar

ControlZ

4:20 am on Mar 3, 2004 (gmt 0)

10+ Year Member



Doc, perhaps I did not explain correctly. I am using PHP form mail but the actual form is HTML, so inserting "\n" will not work.

Here's the actual form:

<snip>

[edited by: jatar_k at 7:54 pm (utc) on Mar. 3, 2004]
[edit reason] way too much code [/edit]

ahmed

11:53 am on Mar 3, 2004 (gmt 0)

10+ Year Member



you can't really code the form to insert line breaks, that's up to the script which processes the form - in this case formmail.php

you have to find the part of formmail.php which prepares the form fields for emailing, and then modify it so it inserts \n where ever you want a line break.

if you post the relevant part of formmail.php I can show you what to modify (please don't post the whole script, if it's very long, sticky me).

ControlZ

4:34 pm on Mar 3, 2004 (gmt 0)

10+ Year Member



Ahmed -- sent you a sticky, thanks!