Re: [PHP] new lines in textareas?

2008-04-01 Thread Richard Lynch
On Sat, March 29, 2008 11:26 pm, Mary Anderson wrote:
 I have a php script which produces text which is to be displayed
 in
 a textarea.  I have the wrap for the text area set to 'hard'.  I need

Do NOT set the wrap to hard

It will only cause you grief in the long run.

It's going to insert newlines where they shouldn't be, and then your
data is corrupt.

 to
 have newlines inserted in the text.
  \n and br don't work.  They just get quoted literally in
 the
 text.  I suspect I need to use htmlspecialchars , but don't know what
 special character to feed it.

If they are being quoted literally, then something is not right...

\n in particular should flow through just fine.

br would be quoted literally if you ran it through htmlspecialchar
or htmlentities.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?


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



Re: [PHP] new lines in textareas?

2008-04-01 Thread Richard Lynch
On Sun, March 30, 2008 7:20 am, jeffry s wrote:

 my client ask me about this problem 2 weeks ago. he want the text to
 automatically
 go to new line after user type until the end of the line. The only
 possible
 solutions so
 far is using wrap='hard' or wrap='soft'
 eg: textarea cols=10 rows=10 wrap=hard
 but wrap only work on IE  Netscape browser. Not working in firefox.
 i guess i want to use javascript to do the text formatting. trigger
 the
 javascript event
 every time the user using the onchange event (i never try)..
 i is quite complicated  i dont have much time working on it.
 so i decided to tell him, it cannot be done :)

If wrap=soft isn't working in Firefox, then your fancy-dancy CSS is
messing things up somehow, or you've managed to do something else
really weird...

Firefox wraps just fine for me, in all the textarea inputs I've ever
used.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?


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



Re: [PHP] new lines in textareas?

2008-03-31 Thread Daniel Brown
On Sun, Mar 30, 2008 at 12:26 AM, Mary Anderson
[EMAIL PROTECTED] wrote:
 Hi all,
 I have a php script which produces text which is to be displayed in
  a textarea.  I have the wrap for the text area set to 'hard'.  I need to
  have newlines inserted in the text.
  \n and br don't work.  They just get quoted literally in the
  text.  I suspect I need to use htmlspecialchars , but don't know what
  special character to feed it.

Sounds like you're using literal quotes here, Mary.  Single quotes
('like this')take all data between them as literal, while double
quotes (like this) translate things within.

$a = Hello!;
$b = I just wanted to say: $a;
$c = 'I just wanted to say: $a';
$d = The quick brown fox jumped over the lazy dogs.\n;
$e = 'The quick brown fox jumped over the lazy dogs.\n';

The above will output as follows:

$a: Hello!
$b: I just wanted to say: Hello!
$c: I just wanted to say: $a
$d: The quick brown fox jumped over the lazy dogs. (with a newline)
$e: The quick brown fox jumped over the lazy dogs.\n

You may instead want to use HEREDOC syntax.

$text =EOT
This will allow for actual newlines to be carried over.

This also means that Windows-vs-Linux-vs-Mac newlines
are translated exactly as they were entered, so if you're
typing the data into the HEREDOC in a standard Windows
environment, you'll have \r\n, whereas Linux will have \n, and
Mac will have \r.  Keep in mind, in a HEREDOC, those
newline characters will not translate, but variables will.

$b

EOT;

As always, if you want a newline after the final text is typed,
include one full blank line after.  And always end your HEREDOC by
typing the signifier as the first character on the line.

Sorry if this is dumbing it down for you, but I wanted to take
the opportunity to not only address what may be your problem, but also
put this tidbit into the archives with the question you asked, since
someone down the road may very well find your question with that
problem.  ;-)

-- 
/Daniel P. Brown
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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



Re: [PHP] new lines in textareas?

2008-03-30 Thread TG

Is \n included literally because you're using single quotes for the variable?

$textdata = 'This is a test\nThis is the second line';

vs...

$textarea = This is a test\nThis is the second line;

I would guess a lot of the pages you find are talking about what to do with 
the text after submitting through the textarea, not re-displaying with 
proper breaks when loading a page containing a text area that should have 
data.

-TG

- Original Message -
From: Mary Anderson [EMAIL PROTECTED]
To: php-general@lists.php.net
Date: Sat, 29 Mar 2008 21:26:24 -0700
Subject: [PHP] new lines in textareas?

 Hi all,
 I have a php script which produces text which is to be displayed in 
 a textarea.  I have the wrap for the text area set to 'hard'.  I need to 
 have newlines inserted in the text.
  \n and br don't work.  They just get quoted literally in the 
 text.  I suspect I need to use htmlspecialchars , but don't know what 
 special character to feed it.
 
  Apologies if this should go to an HTML forum.  I checked several 
 archives and did not find anything useful.  (They tended to tell me to 
 put in \n or br!)
 
  Thanks
 
 Mary Anderson


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



Re: [PHP] new lines in textareas?

2008-03-30 Thread jeffry s
On Sun, Mar 30, 2008 at 2:07 PM, TG [EMAIL PROTECTED] wrote:


 Is \n included literally because you're using single quotes for the
 variable?

 $textdata = 'This is a test\nThis is the second line';

 vs...

 $textarea = This is a test\nThis is the second line;

 I would guess a lot of the pages you find are talking about what to do
 with
 the text after submitting through the textarea, not re-displaying with
 proper breaks when loading a page containing a text area that should have
 data.

 -TG

 - Original Message -
 From: Mary Anderson [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Date: Sat, 29 Mar 2008 21:26:24 -0700
 Subject: [PHP] new lines in textareas?

  Hi all,
  I have a php script which produces text which is to be displayed in
  a textarea.  I have the wrap for the text area set to 'hard'.  I need to
  have newlines inserted in the text.
   \n and br don't work.  They just get quoted literally in the
  text.  I suspect I need to use htmlspecialchars , but don't know what
  special character to feed it.
 
   Apologies if this should go to an HTML forum.  I checked several
  archives and did not find anything useful.  (They tended to tell me to
  put in \n or br!)
 
   Thanks
 
  Mary Anderson


my client ask me about this problem 2 weeks ago. he want the text to
automatically
go to new line after user type until the end of the line. The only possible
solutions so
far is using wrap='hard' or wrap='soft'
eg: textarea cols=10 rows=10 wrap=hard
but wrap only work on IE  Netscape browser. Not working in firefox.
i guess i want to use javascript to do the text formatting. trigger the
javascript event
every time the user using the onchange event (i never try)..
i is quite complicated  i dont have much time working on it.
so i decided to tell him, it cannot be done :)


Re: [PHP] new lines in textareas?

2008-03-30 Thread tedd

At 9:26 PM -0700 3/29/08, Mary Anderson wrote:

Hi all,
   I have a php script which produces text which is to be displayed 
in a textarea.  I have the wrap for the text area set to 'hard'.  I 
need to have newlines inserted in the text.
\n and br don't work.  They just get quoted literally in 
the text.  I suspect I need to use htmlspecialchars , but don't know 
what special character to feed it.


Apologies if this should go to an HTML forum.  I checked several 
archives and did not find anything useful.  (They tended to tell me 
to put in \n or br!)


Thanks

Mary Anderson


Show the code.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] new lines in textareas?

2008-03-30 Thread Paul Scott

On Sun, 2008-03-30 at 12:29 -0400, tedd wrote:
 At 9:26 PM -0700 3/29/08, Mary Anderson wrote:
 Hi all,
 I have a php script which produces text which is to be displayed 
 in a textarea.  I have the wrap for the text area set to 'hard'.  I 
 need to have newlines inserted in the text.
  \n and br don't work.  They just get quoted literally in 
 the text.  I suspect I need to use htmlspecialchars , but don't know 
 what special character to feed it.
 

Only getting to this now, but doesn't nl2br() do what you want?

--Paul
-- 
.
| Chisimba PHP5 Framework - http://avoir.uwc.ac.za   |
::

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

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

Re: [PHP] new lines in textareas?

2008-03-30 Thread jeffry s
On Mon, Mar 31, 2008 at 12:40 AM, Paul Scott [EMAIL PROTECTED] wrote:


 On Sun, 2008-03-30 at 12:29 -0400, tedd wrote:
  At 9:26 PM -0700 3/29/08, Mary Anderson wrote:
  Hi all,
  I have a php script which produces text which is to be displayed
  in a textarea.  I have the wrap for the text area set to 'hard'.  I
  need to have newlines inserted in the text.
   \n and br don't work.  They just get quoted literally in
  the text.  I suspect I need to use htmlspecialchars , but don't know
  what special character to feed it.
  

 Only getting to this now, but doesn't nl2br() do what you 
 want?http://www.php.net/unsub.php


well, i don't think nl2br() is  a solution here because nl2br() only replace
the '\n' with
br/ html tags which is displayed inside the textarea. the textarea will
display a new
line with '\n'..

$str = hello\nworld;
will display

hello
world

in text area. but

$st = 'hello\nworld'.

will be display as

hello\nworld

just like what TG trying to say..


[PHP] new lines in textareas?

2008-03-29 Thread Mary Anderson

Hi all,
   I have a php script which produces text which is to be displayed in 
a textarea.  I have the wrap for the text area set to 'hard'.  I need to 
have newlines inserted in the text.
\n and br don't work.  They just get quoted literally in the 
text.  I suspect I need to use htmlspecialchars , but don't know what 
special character to feed it.


Apologies if this should go to an HTML forum.  I checked several 
archives and did not find anything useful.  (They tended to tell me to 
put in \n or br!)


Thanks

Mary Anderson

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



Re: [PHP] new lines in textareas?

2008-03-29 Thread Casey
On Sat, Mar 29, 2008 at 9:26 PM, Mary Anderson
[EMAIL PROTECTED] wrote:
 Hi all,
 I have a php script which produces text which is to be displayed in
  a textarea.  I have the wrap for the text area set to 'hard'.  I need to
  have newlines inserted in the text.
  \n and br don't work.  They just get quoted literally in the
  text.  I suspect I need to use htmlspecialchars , but don't know what
  special character to feed it.

  Apologies if this should go to an HTML forum.  I checked several
  archives and did not find anything useful.  (They tended to tell me to
  put in \n or br!)

  Thanks

  Mary Anderson

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



\n, or just a plain line break, should work.

?php
 echo 'textareaHello,
My favorite color is blue.
Signed,
Me!';
?

Should work.

-Casey

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



[PHP] New lines

2004-02-03 Thread Nico Berg
Hi all,
I have a list of words (sense):
FIRST
SECOND
AND THIRD
FOURTH
etc

fread gives back FIRST SECOND AND THIRD FOURTH

How can i get the list as is?

Nico

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



Re: [PHP] New lines

2004-02-03 Thread Jason Wong
On Tuesday 03 February 2004 21:26, Nico Berg wrote:
 fread gives back FIRST SECOND AND THIRD FOURTH

How did you ascertain that?

 How can i get the list as is?

Taking a wild guess I would say you need to familiarise yourself with HTML 
before using PHP. In the meantime you could have a look at nl2br().

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Artificial intelligence has the same relation to intelligence as
artificial flowers have to flowers.
-- David Parnas
*/

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



RE: [PHP] New lines

2004-02-03 Thread Nico Berg
He, Jason thank's.

BTW, the site www.gremlins.biz doesn't work, maybe learn something about
webdeamons before making websites...

Gr, Nico

PS wrong guess!

 -Oorspronkelijk bericht-
 Van: Jason Wong [mailto:[EMAIL PROTECTED]
 Verzonden: dinsdag 3 februari 2004 15:16
 Aan: [EMAIL PROTECTED]
 Onderwerp: Re: [PHP] New lines


 On Tuesday 03 February 2004 21:26, Nico Berg wrote:
  fread gives back FIRST SECOND AND THIRD FOURTH

 How did you ascertain that?

  How can i get the list as is?

 Taking a wild guess I would say you need to familiarise yourself
 with HTML
 before using PHP. In the meantime you could have a look at nl2br().

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Artificial intelligence has the same relation to intelligence as
 artificial flowers have to flowers.
   -- David Parnas
 */

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


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



Re: [PHP] New lines

2004-02-03 Thread Jason Wong
On Tuesday 03 February 2004 22:50, Nico Berg wrote:

 BTW, the site www.gremlins.biz doesn't work, maybe learn something about
 webdeamons before making websites...

Works for me ... maybe you have the wrong browser.

 PS wrong guess!

Well, I'm no mind-reader. If you're not going to post any code then consider 
this thread dead.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Why do we drive on parkways and park on driveways? 
-- Why Why Why n30
*/

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



Re: [PHP] New lines

2004-02-03 Thread John Nichel
Nico Berg wrote:

He, Jason thank's.

BTW, the site www.gremlins.biz doesn't work, maybe learn something about
webdeamons before making websites...
His site works for me.  Maybe you shouloh, nevermind.

Gr, Nico

PS wrong guess!
If you were a bit more clear about your issue, and if you posted some 
code, maybe he wouldn't have to guess.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] New lines

2004-02-03 Thread Robert Sossomon
There was a wong answer and then there is the right answer:

$fp = fopen($file,r);
  while (!feof($fp))
   {
$line = fgets($fp, 4096); //gets one line at a time
echo $line; // Or whatever else you want to do
   }
  fclose($fp);


HTH.
Robert

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



Re: [PHP] New lines

2004-02-03 Thread Jason Wong
On Wednesday 04 February 2004 03:26, Robert Sossomon wrote:

 There was a wong answer

I assume that was a weak attempt at a cheap joke, or else you couldn't spell, 
or you need a new keyboard, or something.

 and then there is the right answer:

Whether that is the right answer depends on why the OP thought fread() didn't 
cope with new lines.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
86. What do you mean that wasn't a copy?

--Top 100 things you don't want the sysadmin to say
*/

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



Re: [PHP] New lines

2004-02-03 Thread John Nichel
Robert Sossomon wrote:

There was a wong answer and then there is the right answer:

$fp = fopen($file,r);
  while (!feof($fp))
   {
$line = fgets($fp, 4096); //gets one line at a time
echo $line; // Or whatever else you want to do
   }
  fclose($fp);
HTH.
Robert
If all the OP wants to do is echo out the file, then why not just use 
the file() function.  Then each line is loaded up into an array element, 
 and you've saved yourself a bit of cpu.  And your example above 
doesn't address the OP's claim that it is not handling new lines. 
Course, without seeing his code, or having him explain the issue a bit 
better, all we're doing is spitting in the wind.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] New lines

2004-02-03 Thread John W. Holmes
From: John Nichel [EMAIL PROTECTED]

 If all the OP wants to do is echo out the file, then why not just use
 the file() function.  Then each line is loaded up into an array element,
   and you've saved yourself a bit of cpu.  And your example above
 doesn't address the OP's claim that it is not handling new lines.

file_get_contents() would be the fastest. And once the OP learns the
difference between TEXT and HTML, he'll realize he just needs to use the
nl2br() function. :)

---John Holmes...

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



Re: [PHP] New lines

2004-02-03 Thread John Nichel
John W. Holmes wrote:

From: John Nichel [EMAIL PROTECTED]

If all the OP wants to do is echo out the file, then why not just use
the file() function.  Then each line is loaded up into an array element,
 and you've saved yourself a bit of cpu.  And your example above
doesn't address the OP's claim that it is not handling new lines.


file_get_contents() would be the fastest. And once the OP learns the
difference between TEXT and HTML, he'll realize he just needs to use the
nl2br() function. :)
---John Holmes...

Yeah, Jason suggested that (nl2br), and was told by the OP that he was 
wrong, so the realization may take more time than expected. ;)

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] New lines

2004-02-03 Thread Robert Sossomon
A LOT of this is pure speculation though, which is why I sent the one I
did.  Since with it he can patch whatever data he gets from $line into
his code wherever he needs it, whether he flat file is pure text or some
HTML or if the output is going to be a drop-down list (nl2br wouldn't
work in this case, right?) or just a straight display of the stuff line
by line (nl2br in this case) but as with I have found with my own stuff,
my bosses like to change the UI halfway through, so the less code I have
to go back and fiddle with while developing is worth the extra CPU
cycles.   2 * 2G processor and 1G of ram means cpu cycles I won't
miss...

Robert

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



RE: [PHP] New lines

2004-02-03 Thread Nico Berg

Guys, guys,
No quarrel please! The website of mr. Wong works fine. The first time it
take a long time to open and I falsly thought the site didn't work. But on
the other site i know what html is and no the list i want has nothing to do
with html!

The code I use is not mine, it is a hangman game wich I want to write a
admin page for So here's some code:

# list of words (phrases) to guess below, separated by new line

$list = BUITENSPEL STAAN
IEMAND BUITENSPEL ZETTEN
BLOED AAN DE PAAL WILLEN
ELKAAR DE BAL TOESPELEN
DE BAL IS ROND
DE BAL TERUGSPELEN
OP HET VERKEERDE BEEN ZETTEN
IN EIGEN DOEL SCHIETEN
VOOR OPEN DOEL SCOREN
VOOR OPEN DOEL MISSEN
GELE KAART
KRIJTLIJNEN TREKKEN
EEN SCHOT VOOR OPEN DOEL
VLIEGENDE KIEP
EEN VOORZET GEVEN
AAN DE ZIJLIJN STAAN
AFFLUITEN
BOBO
EEN-TWEETJE
NATRAPPEN
PANIEKVOETBAL
PATATGENERATIE
TACKELEN;

$additional_letters =  -.,;!?%0123456789;# extra characters given in
words; '?' not work
**
This is where the var's $list and $additional_letters are filled. The file
is called hangman.php. I want to open this file, put the words into a html
file so that someone can change them and write them back. That's it.

Nico

 -Oorspronkelijk bericht-
 Van: John Nichel [mailto:[EMAIL PROTECTED]
 Verzonden: dinsdag 3 februari 2004 21:57
 Aan: [EMAIL PROTECTED]
 Onderwerp: Re: [PHP] New lines


 John W. Holmes wrote:

  From: John Nichel [EMAIL PROTECTED]
 
 If all the OP wants to do is echo out the file, then why not just use
 the file() function.  Then each line is loaded up into an array element,
   and you've saved yourself a bit of cpu.  And your example above
 doesn't address the OP's claim that it is not handling new lines.
 
 
  file_get_contents() would be the fastest. And once the OP learns the
  difference between TEXT and HTML, he'll realize he just needs to use the
  nl2br() function. :)
 
  ---John Holmes...
 

 Yeah, Jason suggested that (nl2br), and was told by the OP that he was
 wrong, so the realization may take more time than expected. ;)

 --
 By-Tor.com
 It's all about the Rush
 http://www.by-tor.com

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


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



RE: [PHP] New lines

2004-02-03 Thread Matt Matijevich
[snip]
This is where the var's $list and $additional_letters are filled. The
file
is called hangman.php. I want to open this file, put the words into a
html
file so that someone can change them and write them back. That's it.
[/snip]

is it out of the question to store the values in ther own separate
files. so :
BUITENSPEL STAAN
IEMAND BUITENSPEL ZETTEN
BLOED AAN DE PAAL WILLEN
ELKAAR DE BAL TOESPELEN
DE BAL IS ROND
DE BAL TERUGSPELEN
OP HET VERKEERDE BEEN ZETTEN
IN EIGEN DOEL SCHIETEN
VOOR OPEN DOEL SCOREN
VOOR OPEN DOEL MISSEN
GELE KAART
KRIJTLIJNEN TREKKEN
EEN SCHOT VOOR OPEN DOEL
VLIEGENDE KIEP
EEN VOORZET GEVEN
AAN DE ZIJLIJN STAAN
AFFLUITEN
BOBO
EEN-TWEETJE
NATRAPPEN
PANIEKVOETBAL
PATATGENERATIE
TACKELEN

is in one file and :
-.,;!?%0123456789

is in another file, then php opens those 2 files to get the values for
the variables.  I would think that would be a lot easier than trying to
edit the php file.

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



Re: [PHP] new lines in text fields

2001-07-25 Thread Brad Wright

use the 'nl2br' fuction‹ Inserts HTML line breaks before all newlines in a
string

 From: Mat Marlow [EMAIL PROTECTED]
 Date: Fri, 6 Jul 2001 16:06:58 +0100
 To: [EMAIL PROTECTED]
 Subject: [PHP] new lines in text fields
 
 Hi all,
 I am in desperate need for a solution to HTML text fields not storing new
 lines. I'm storing news articles in a database but all the text just ends up
 in a big block because it ignores line breaks. Is thre a way around this
 without having to upload text files?
 
 Thanks,
 
 Mat
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] new lines in text fields

2001-07-08 Thread David Robley

On Sat,  7 Jul 2001 00:36, Mat Marlow wrote:
 Hi all,
 I am in desperate need for a solution to HTML text fields not storing
 new lines. I'm storing news articles in a database but all the text
 just ends up in a big block because it ignores line breaks. Is thre a
 way around this without having to upload text files?

 Thanks,

 Mat

You probably want the WRAP=virtual parameter in your TEXTAREA.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Is it OK to yell 'MOVIE' in a crowded firehouse?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] new lines in text fields

2001-07-06 Thread Mat Marlow

Hi all,
I am in desperate need for a solution to HTML text fields not storing new
lines. I'm storing news articles in a database but all the text just ends up
in a big block because it ignores line breaks. Is thre a way around this
without having to upload text files?

Thanks,

Mat



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] new lines in text fields

2001-07-06 Thread rick

Have you tried putting the newline character (\n) into your html?  That
works great for me.  My only problem is that the output from an XSL
transformation has all the line breaks stripped out...

- Original Message -
From: Mat Marlow [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 06, 2001 8:06 AM
Subject: [PHP] new lines in text fields


 Hi all,
 I am in desperate need for a solution to HTML text fields not storing new
 lines. I'm storing news articles in a database but all the text just ends
up
 in a big block because it ignores line breaks. Is thre a way around this
 without having to upload text files?

 Thanks,

 Mat



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] new lines in text fields

2001-07-06 Thread Mauricio T?llez Jim?nez

Hi, I don't know what is exactly what you want to do, but I have a page with a 
textarea tag, and a mySQL database with a TEXT field, that way I can use newline 
breaks.
Bye.

On Fri, Jul 06, 2001 at 04:06:58PM +0100, Mat Marlow wrote:
 Hi all,
 I am in desperate need for a solution to HTML text fields not storing new
 lines. I'm storing news articles in a database but all the text just ends up
 in a big block because it ignores line breaks. Is thre a way around this
 without having to upload text files?
 
 Thanks,
 
 Mat
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]