[ciapug] Formatting with line breaks...
Chris Hettinger
ciapug@cialug.org
Mon, 15 Dec 2003 09:15:26 -0600
This is a multi-part message in MIME format.
------=_NextPart_000_70F43_01C3C2EB.FB884220
x-gfisavedcharset: US-ASCII
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Background, I have a application that collect information in a mysql db,
does some processing, and based on the outcome I either build a
formatted email and send it, or do a series of inserts into our mssql
server and in this case I have to insert a formatted notes entry.
=20
I have to write this information two different ways, I will do one or
the other:
=20
1. Formatted Email Message
2. Into a long text DB field, that will then be displayed in a internal
application
=20
=20
Tim: No I had not used the <pre></pre> tags
=20
-ch
-----Original Message-----
From: ciapug-admin@cialug.org [mailto:ciapug-admin@cialug.org]On Behalf
Of Jerry Weida
Sent: Monday, December 15, 2003 8:38 AM
To: ciapug@cialug.org
Subject: Re: [ciapug] Formatting with line breaks...
Where are you writing this output to? A file? A browser?
Chris Hettinger wrote:
Hmm, this didn't seem to work either.
$note =3D "*** Generate from Web Form Submission ***" . chr(13) =
.
chr(10)
. "testing note formatting.";
Still writes a single line. hrmmm...=20
*still trying*
-----Original Message-----
From: David Champion [ mailto:dave@visionary.com]
Sent: Friday, December 12, 2003 4:56 PM
To: ciapug@cialug.org
Subject: Re: [ciapug] Formatting with line breaks...
You're thinking of a different issue, Jerry. That's addressed with the=20
nl2br() function.
He needs to actually insert :
$x =3D "text " . chr(13) . chr(10);
I don't recall that there's a constant for CRLF, like VB's vbCRLF... but
you could put on in your code, i.e.
$_CRLF =3D chr(13) . chr(10);
-dc
Jerry Weida wrote:
=20
Are you checking the source? Text-style line breaks won't display in=20
a browser, but they will show up in the source.
Chris Hettinger wrote:
=20
I am trying to insert into a db field a note entry which will contain=20
the details of a web form, but I have to build that long note entry=20
first, and do some light formatting like line breaks...
$note =3D "Generate from Web Form Submission \r\n"
. "testing note formatting. \r\n";
How ever this isn't working as I would have suspected. For testing it=20
as I build it I am just echoing it out to the browser with <?=3D $note;=20
?> ... It displays but is not including the line breaks.
=20
_______________________________________________
ciapug mailing list
ciapug@cialug.org
http://cialug.org/mailman/listinfo/ciapug
CONFIDENTIALITY NOTICE: This communication, including any attachment,
may contain confidential information and is intended only for the
individual or entity to whom it is addressed. Any review,
dissemination, or copying of this communication by anyone other than the
intended recipient is strictly prohibited. If you are not the intended
recipient, please contact the sender by reply email, delete and destroy
all copies of the original message.'
_______________________________________________
ciapug mailing list
ciapug@cialug.org
http://cialug.org/mailman/listinfo/ciapug
=20
_______________________________________________ ciapug mailing list
ciapug@cialug.org http://cialug.org/mailman/listinfo/ciapug
CONFIDENTIALITY NOTICE: This communication, including any attachment, =
may contain confidential information and is intended only for the =
individual or entity to whom it is addressed. Any review, =
dissemination, or copying of this communication by anyone other than the =
intended recipient is strictly prohibited. If you are not the intended =
recipient, please contact the sender by reply email, delete and destroy =
all copies of the original message.'
------=_NextPart_000_70F43_01C3C2EB.FB884220
x-gfisavedcharset: US-ASCII
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE></TITLE>
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2><SPAN=20
class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2>Background, I=20
have a application that collect information in a mysql db, does some =
processing,=20
and based on the outcome I either build a formatted email and send it, =
or do a=20
series of inserts into our mssql server and in this case I have to =
insert a=20
formatted notes entry.</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2>I have=20
to write this information two different ways, <SPAN=20
class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff size=3D2>I =
will do one or=20
the other</FONT></SPAN>:</FONT></SPAN></DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2>1.=20
Formatted Email Message</FONT></SPAN></DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2>2.=20
Into a long text DB field, that will then be displayed in a internal=20
application</FONT></SPAN></DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2>Tim:=20
No I had not used the <pre></pre> tags</FONT></SPAN></DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D667271015-15122003><FONT face=3DArial color=3D#0000ff =
size=3D2>-ch</FONT></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> =
ciapug-admin@cialug.org=20
[mailto:ciapug-admin@cialug.org]<B>On Behalf Of </B>Jerry=20
Weida<BR><B>Sent:</B> Monday, December 15, 2003 8:38 AM<BR><B>To:</B>=20
ciapug@cialug.org<BR><B>Subject:</B> Re: [ciapug] Formatting with line =
breaks...<BR><BR></FONT></DIV>Where are you writing this output =
to? A=20
file? A browser?<BR><BR>Chris Hettinger wrote:<BR>
<BLOCKQUOTE=20
=
cite=3DmidF1E03A25DAB40840B4AE300849242D05017C0A36@encmail.encompass.enc =
type=3D"cite"><PRE wrap=3D"">Hmm, this didn't seem to work either.
$note =3D "*** Generate from Web Form Submission ***" . chr(13) =
. chr(10)
. "testing note formatting.";
Still writes a single line. hrmmm...=20
*still trying*
-----Original Message-----
From: David Champion [<A class=3Dmoz-txt-link-freetext =
href=3D"mailto:dave@visionary.com">mailto:dave@visionary.com</A>]
Sent: Friday, December 12, 2003 4:56 PM
To: <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:ciapug@cialug.org">ciapug@cialug.org</A>
Subject: Re: [ciapug] Formatting with line breaks...
You're thinking of a different issue, Jerry. That's addressed with the=20
nl2br() function.
He needs to actually insert :
$x =3D "text " . chr(13) . chr(10);
I don't recall that there's a constant for CRLF, like VB's vbCRLF... but =
you could put on in your code, i.e.
$_CRLF =3D chr(13) . chr(10);
-dc
Jerry Weida wrote:
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Are you checking the =
source? Text-style line breaks won't display in=20
a browser, but they will show up in the source.
Chris Hettinger wrote:
</PRE>
<BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">I am trying to insert =
into a db field a note entry which will contain=20
the details of a web form, but I have to build that long note entry=20
first, and do some light formatting like line breaks...
$note =3D "Generate from Web Form Submission \r\n"
. "testing note formatting. \r\n";
How ever this isn't working as I would have suspected. For testing it=20
as I build it I am just echoing it out to the browser with <?=3D =
$note;=20
?> ... It displays but is not including the line breaks.
</PRE></BLOCKQUOTE></BLOCKQUOTE><PRE wrap=3D""><!---->
_______________________________________________
ciapug mailing list
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:ciapug@cialug.org">ciapug@cialug.org</A>
<A class=3Dmoz-txt-link-freetext =
href=3D"http://cialug.org/mailman/listinfo/ciapug">http://cialug.org/mail=
man/listinfo/ciapug</A>
CONFIDENTIALITY NOTICE: This communication, including any attachment, =
may contain confidential information and is intended only for the =
individual or entity to whom it is addressed. Any review, =
dissemination, or copying of this communication by anyone other than the =
intended recipient is strictly prohibited. If you are not the intended =
recipient, please contact the sender by reply email, delete and destroy =
all copies of the original message.'
_______________________________________________
ciapug mailing list
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:ciapug@cialug.org">ciapug@cialug.org</A>
<A class=3Dmoz-txt-link-freetext =
href=3D"http://cialug.org/mailman/listinfo/ciapug">http://cialug.org/mail=
man/listinfo/ciapug</A>
</PRE></BLOCKQUOTE>_______________________________________________ =
ciapug=20
mailing list ciapug@cialug.org=20
http://cialug.org/mailman/listinfo/ciapug</BLOCKQUOTE></BODY></HTML>
<HTML><BODY><P><FONT color=3D#000000 face=3D"Arial" =
size=3D2>CONFIDENTIALITY NOTICE: This communication, including any =
attachment, may contain confidential information and is intended only =
for the individual or entity to whom it is addressed. Any review, =
dissemination, or copying of this communication by anyone other than the =
intended recipient is strictly prohibited. If you are not the intended =
recipient, please contact the sender by reply email, delete and destroy =
all copies of the original message.'<BR></FONT></BODY></HTML>
------=_NextPart_000_70F43_01C3C2EB.FB884220--