Re: Re: [PHP] text insertion

2011-08-10 Thread Tim Streater
On 10 Aug 2011 at 22:07, Chris Stinemetz wrote: >> >>    Use HTML 'pre' tags: >> >>         >> > > I just tried that and that puts all the text on a single line. You could write the string into another textarea, which you could make readonly for this purpose. -- Cheers -- Tim -- PHP Gener

Re: Re: [PHP] text insertion

2011-08-10 Thread Ashley Sheridan
Tim Streater wrote: >On 10 Aug 2011 at 22:39, Daniel P. Brown >wrote: > >> On Wed, Aug 10, 2011 at 17:37, Chris Stinemetz > >> wrote: >>> No luck. Thanks. >> >>Per list rules, please don't top-post. >> >>If the situation you're describing is accurate and correct, then >> is indeed wha

Re: Re: [PHP] text insertion

2011-08-10 Thread Tim Streater
On 10 Aug 2011 at 22:39, Daniel P. Brown wrote: > On Wed, Aug 10, 2011 at 17:37, Chris Stinemetz > wrote: >> No luck. Thanks. > >Per list rules, please don't top-post. > >If the situation you're describing is accurate and correct, then > is indeed what you want. But can you put a ins

Re: [PHP] text insertion

2011-08-10 Thread Daniel P. Brown
On Wed, Aug 10, 2011 at 17:37, Chris Stinemetz wrote: > No luck. Thanks. Per list rules, please don't top-post. If the situation you're describing is accurate and correct, then is indeed what you want. -- Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-43

Re: [PHP] text insertion

2011-08-10 Thread Chris Stinemetz
No luck. Thanks. On Aug 10, 2011 4:17 PM, wrote: > > how about > > echo nl2br($your_content); > > > > > - Original Message - > From: Chris Stinemetz > Date: Wednesday, August 10, 2011 5:09 pm > Subject: Re: [PHP] text insertion > To: "D

Re: [PHP] text insertion

2011-08-10 Thread hdedeyan
how about echo nl2br($your_content); - Original Message - From: Chris Stinemetz Date: Wednesday, August 10, 2011 5:09 pm Subject: Re: [PHP] text insertion To: "Daniel P. Brown" Cc: Ashley Sheridan , PHP General > > > >Use HTML 'pre' tags: >

Re: [PHP] text insertion

2011-08-10 Thread Chris Stinemetz
> >    Use HTML 'pre' tags: > >         > I just tried that and that puts all the text on a single line. echo ' ' . $posts_row['first_name'] . ' ' . $posts_row['last_name'] . ' ' . date('m-d-Y h:iA', strtotime($posts_row['store_date'])) . ' Broad Band test results: ' . $posts_row['store_tptest

Re: [PHP] text insertion

2011-08-10 Thread Daniel P. Brown
:On Wed, Aug 10, 2011 at 16:02, Chris Stinemetz wrote: >> Are you sure its not preserved? When you output text in a browser, by >> default its output as html, not plain text. Html ignores extraneous >> whitespace, and doesn't use a monospaced font, so formatting text into >> columns in a textar

Re: [PHP] text insertion

2011-08-10 Thread Shaun Farrell
You could try using markdown too. Sent from my iPhone On Aug 10, 2011, at 3:57 PM, Ashley Sheridan wrote: > > > Chris Stinemetz wrote: > >> How do I preserve text formatting when text is inserted into a database >> table? >> >> For example: I am using a textarea to allow users to leave co

Re: [PHP] text insertion

2011-08-10 Thread Chris Stinemetz
> Are you sure its not preserved? When you output text in a browser, by default > its output as html, not plain text. Html ignores extraneous whitespace, and > doesn't use a monospaced font, so formatting text into columns in a textarea > won't work either. Look at the html source code to see wh

Re: [PHP] text insertion

2011-08-10 Thread Ashley Sheridan
Chris Stinemetz wrote: >How do I preserve text formatting when text is inserted into a database >table? > >For example: I am using a textarea to allow users to leave comments >into the database and I am using: > >'" . mysql_real_escape_string($_POST['store_comments']) . "', to >prevent SQL inj