Re: [PHP-DB] how to format the output of the text info that user uploaded?

2002-08-19 Thread Robert Parker

On Sunday 18 August 2002 04:22 pm, you wrote:
 I have a field in a form which allows user to upload thier biographys.Once
 they upload a bunch of texts,the script I wrote automatically show it on a
 webpage, however, the contents are all scrambled toghther without line
 break and formatting..
 How am I able to show the formatted outputs?

 I tried to use pre /pre, but it didn't work well.
I suspect that those tags are the problem,  because you are
telling the browser that this output has been formatted already.
Try using p .. /p and let the browser format the text.
That way any \n, extra spaces etc will just be ignored.

 Any suggestions?

 Thank you!

 Bo

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




Re: [PHP-DB] how to format the output of the text info that user uploaded?

2002-08-19 Thread Brent Baisley

It sounds like you want to use the nl2br() function. That will convert 
the new lines to HTML line breaks and give you the paragraphs that the 
user put in.

On Sunday, August 18, 2002, at 04:22 PM, bo wrote:

 I have a field in a form which allows user to upload thier 
 biographys.Once
 they upload a bunch of texts,the script I wrote automatically show it 
 on a
 webpage, however, the contents are all scrambled toghther without line 
 break
 and formatting..
 How am I able to show the formatted outputs?

 I tried to use pre /pre, but it didn't work well.

 Any suggestions?

 Thank you!

 Bo

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


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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




[PHP-DB] how to format the output of the text info that user uploaded?

2002-08-18 Thread bo

I have a field in a form which allows user to upload thier biographys.Once
they upload a bunch of texts,the script I wrote automatically show it on a
webpage, however, the contents are all scrambled toghther without line break
and formatting..
How am I able to show the formatted outputs?

I tried to use pre /pre, but it didn't work well.

Any suggestions?

Thank you!

Bo



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