RE: [mysql - php] Newline to BR problem
| From: | Maureen Roihl | Date: | Fri, 10 Jan 2003 14:56:43 +0000 |
| Subject: | RE: [mysql - php] Newline to BR problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24742@lists.php.net to get a copy of this message | ||
It depends on how else you're going to use the info. If you're positive
you're only ever going to display it on a webpage, you could go ahead and
convert it before you insert the data. However, if you might want to use it
for something else (include in an email, a report, whatever), it might be
simpler to just store it with the \n's and do the conversion when it's
pulled out for display online.
-mo
> -----Original Message-----
> From: Ro Stonemountain [mailto:roderik@rockdesign.net]
> Sent: Thursday, January 09, 2003 10:53 AM
> To: php-db@lists.php.net
> Subject: [mysql - php] Newline to BR problem
>
>
> I'm trying to place a text from a textfield into a database
> and displaying
> it on another page. All works fine and well but my problem is:
>
> If i place newline characters (press enter) in the forms
> textfield they
> don't show up on my display page. This is logical because
> newlines are not
> <br> codes. So i must replace the newline thingies with <br>
> code. Should
> this be done BEFORE i put the text in the database or AFTER i
> put the text
> in the database and what functions can i use????
>
> Maybe it's a newbie question but it's on my mind for a few
> days now and i
> haven't found an answer yet, thanx!
>
>
>