Re: [PHP-DB] MySQL to Email and Line Breaks

2002-04-14 Thread DL Neil

Jeff,

 I have a form where someone enters the body of an email message
 into a textarea part of a form to be sent out to a list. Then a
script
 retrieves the body and sends it via email. However I can't get line
breaks
 to show up (I'm using MS Outlook) even if I enter the \n into the
textarea
 form and those \n show up in the database data. I must be missing
 something. Thanks for any help.


Line Breaks across different OpSys:

*nix: newline character
Mac: carriage return character
Windows: both CR and LF

LF = Newline/Line Break/Line Feed = ASCII chr(10)
CR = Carriage Return = ASCII chr(13)

Regards,
=dn


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] MySQL to Email and Line Breaks

2002-04-14 Thread Jonathan David Edwin Wright

Hiya,

If I remember correctly, you much send both \r and \n to terminate a line 
on an e-mail, regardless of the platform. This should include the header 
aswell.

At 12:00 14/04/2002 +0100, DL Neil wrote:
Jeff,

  I have a form where someone enters the body of an email message
  into a textarea part of a form to be sent out to a list. Then a
script
  retrieves the body and sends it via email. However I can't get line
breaks
  to show up (I'm using MS Outlook) even if I enter the \n into the
textarea
  form and those \n show up in the database data. I must be missing
  something. Thanks for any help.


Line Breaks across different OpSys:

*nix: newline character
Mac: carriage return character
Windows: both CR and LF

LF = Newline/Line Break/Line Feed = ASCII chr(10)
CR = Carriage Return = ASCII chr(13)

Regards,
=dn


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MySQL to Email and Line Breaks

2002-04-14 Thread Jeff Oien

How do I get it to do that? I tried replacing \n with \r\n but it's not
even finding any \n. This is really puzzling me. If I copy the data
from the database field using MySQL-Front and paste it into a word 
processor it will have the line breaks retained. But what is it in the 
data that shows these breaks? I can't find any \n in the data. Then 
when it's sent via email of course there are no line breaks displayed.
Jeff Oien

 Hiya,
 
 If I remember correctly, you much send both \r and \n to terminate a line 
 on an e-mail, regardless of the platform. This should include the header 
 aswell.
 
 At 12:00 14/04/2002 +0100, DL Neil wrote:
 Jeff,
 
   I have a form where someone enters the body of an email message
   into a textarea part of a form to be sent out to a list. Then a
 script
   retrieves the body and sends it via email. However I can't get line
 breaks
   to show up (I'm using MS Outlook) even if I enter the \n into the
 textarea
   form and those \n show up in the database data. I must be missing
   something. Thanks for any help.
 
 
 Line Breaks across different OpSys:
 
 *nix: newline character
 Mac: carriage return character
 Windows: both CR and LF
 
 LF = Newline/Line Break/Line Feed = ASCII chr(10)
 CR = Carriage Return = ASCII chr(13)
 
 Regards,
 =dn
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] MySQL to Email and Line Breaks

2002-04-14 Thread DL Neil

Jeff,

Is there something about the evaluation of \n in different types of
strings, eg single quotes/double quotes? (I don't know the answer)...
FWIW I don't like (perhaps, I don't trust) the \r\n type of short-cuts.

Herewith some sample code:
...
   $LinkText= Requested data can be found at: $source . CRLF .
CRLF .
Run date: $DocDate . CRLF;
...

The constants are defined in an Include/Require file:
...
define( 'LF',  chr(  10 ) );
define( 'CR',  chr(  13 ) );
define( 'CRLF',   CR.LF );
...

It works for me!

Regards,
=dn


 How do I get it to do that? I tried replacing \n with \r\n but it's
not
 even finding any \n. This is really puzzling me. If I copy the data
 from the database field using MySQL-Front and paste it into a word
 processor it will have the line breaks retained. But what is it in the
 data that shows these breaks? I can't find any \n in the data. Then
 when it's sent via email of course there are no line breaks displayed.
 Jeff Oien

  Hiya,
 
  If I remember correctly, you much send both \r and \n to terminate a
line
  on an e-mail, regardless of the platform. This should include the
header
  aswell.
 
  At 12:00 14/04/2002 +0100, DL Neil wrote:
  Jeff,
  
I have a form where someone enters the body of an email message
into a textarea part of a form to be sent out to a list. Then
a
  script
retrieves the body and sends it via email. However I can't get
line
  breaks
to show up (I'm using MS Outlook) even if I enter the \n into
the
  textarea
form and those \n show up in the database data. I must be
missing
something. Thanks for any help.
  
  
  Line Breaks across different OpSys:
  
  *nix: newline character
  Mac: carriage return character
  Windows: both CR and LF
  
  LF = Newline/Line Break/Line Feed = ASCII chr(10)
  CR = Carriage Return = ASCII chr(13)
  
  Regards,
  =dn
  
  
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] MySQL to Email and Line Breaks

2002-04-13 Thread Jeff Oien

I have a form where someone enters the body of an email message
into a textarea part of a form to be sent out to a list. Then a script 
retrieves the body and sends it via email. However I can't get line breaks
to show up (I'm using MS Outlook) even if I enter the \n into the textarea 
form and those \n show up in the database data. I must be missing 
something. Thanks for any help.
Jeff Oien

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] MySQL to Email and Line Breaks

2002-04-13 Thread olinux

check out nl2br() function [newline to break]
http://www.php.net/manual/en/function.nl2br.php

olinux



 Jeff Oien  wrote: I have a form where someone enters
the body of an email messageinto a part of a form to
be sent out to a list. Then a script retrieves the
body and sends it via email. However I can't get line
breaksto show up (I'm using MS Outlook) even if I
enter the \n into the textarea form and those \n show
up in the database data. I must be missing something.
Thanks for any help.Jeff Oien-- PHP Database Mailing
List (http://www.php.net/)To unsubscribe, visit: http://www.php.net/unsub.php

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MySQL to Email and Line Breaks

2002-04-13 Thread Jeff Oien

This isn't what I'm looking for because the output is to email not HTML.
What I would like is the natural line breaks in the form input to be 
preserved and then result in line breaks in the email without having
to add any \n, which didn't work anyway.
Jeff Oien

 check out nl2br() function [newline to break]
 http://www.php.net/manual/en/function.nl2br.php
 
 olinux
 
 
 
  Jeff Oien  wrote: I have a form where someone enters
 the body of an email messageinto a part of a form to
 be sent out to a list. Then a script retrieves the
 body and sends it via email. However I can't get line
 breaksto show up (I'm using MS Outlook) even if I
 enter the \n into the textarea form and those \n show
 up in the database data. I must be missing something.
 Thanks for any help.Jeff Oien

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php