Re: [PHP] HTML to mysql - from msql to html

2002-05-05 Thread Miguel Cruz

On Sat, 4 May 2002, Mantas Kriauciunas wrote:
  I have hare a little problem. Well i have in the page TEXTAREA
  thingy and there i wrote text like that(between lines):
 
  --
  foo bar
 
  more foo bar
  --
 
  now i do msql_query(UPDATE.); and it sets into the
  database with just space. and when i take it out from database there
  is no empty line in the middle.

View the source of the page displaying the retrieved data. If the text 
displays on multiple lines there, then you just need to call nl2br() on 
the string to convert internal line breaks to HTML breaks.

If the text does not show line breaks in the source (or when you use the 
mysql CLI to query), then you need to change the parameters of the 
TEXTAREA. Probably textarea wrap=soft but I'm not 100% sure offhand.

miguel


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




RE: [PHP] HTML to mysql - from msql to html

2002-05-04 Thread John Holmes

www.php.net/nl2br

---John Holmes...

 -Original Message-
 From: Mantas Kriauciunas [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, May 04, 2002 11:27 PM
 To: PHP General List
 Subject: [PHP] HTML to mysql - from msql to html
 
 Hey PHP General List,
 
  I have hare a little problem. Well i have in the page TEXTAREA
  thingy and there i wrote text like that(between lines):
 
  --
  foo bar
 
  more foo bar
  --
 
  now i do msql_query(UPDATE.); and it sets into the
  database with just space. and when i take it out from database there
  is no empty line in the middle. I can see only like that when i do
  echo $myrow[1] after fetching array:
 
  --
  foo bar more foo bar
  --
 
  so how should i do and what should i use to put it like it was set.
 
  P.S i know there have been some questions like that but i didn't see
  them myself
 
  thanks for helping me out :)
 
 :--:
 Have A Nice Day!
  Mantas Kriauciunas A.k.A mNTKz
 
 Contacts:
 [EMAIL PROTECTED]
 Http://mntkz-hata.visiems.lt
 
 
 --
 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