php-db | 2001011
Date: 01/13/01
- Next message: sarahana: "[PHP-DB] Desperate Help needed"
- Previous message: Roman Serbski: "[PHP-DB] MySQL+PHP charset problem"
- In reply to: simon: "Re: [PHP-DB] Text Control."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Od: "simon" <simon.pospisil <email protected>>
Temat: Re: [PHP-DB] Text Control.
> Ian wrote:
>
> > Dear Sir / Madam,
> >
> > Problem :-
> > Data from HTML <textarea name="test" rows="5" cols="40"
> > WRAP="virtual"></textarea> is likes,
> > This is a testing messages:-
> > 1. MSG A.
> > 2. MSG B.
> > 3. MSG C.
> >
> > So, I insert $test into MYSQL database. After that, I login into MYSQL
and
> > select the test field, the display is same as above. But, when I used
PHP
> > coding to select the test field and display it in HTML page, output
likes,
> > This is a testing messages:- 1. MSG A. 2. MSG B. 3. MSG C.
> >
> > How to display $test in the requested format?
> You could try using the nl2br function, thus converting all newline
> characters to <BR> tags.
>
> http://uk.php.net/manual/function.nl2br.php
Eventually you can show contents of this field using <PRE> </PRE> tags -
it's specially useful in situation like this:
- in <TEXTAREA> you enter text like
MSG A
MSG B <- note two [spaces] here
MSG C <- here are four [spaces]
- when you show it in html document you see exactly the same thing.
Cheers
Jarek Zgoda
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sarahana: "[PHP-DB] Desperate Help needed"
- Previous message: Roman Serbski: "[PHP-DB] MySQL+PHP charset problem"
- In reply to: simon: "Re: [PHP-DB] Text Control."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

