Text Area Question
| From: | ConbuD | Date: | Wed, 28 Apr 2004 07:50:57 +0000 |
| Subject: | Text Area Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-184834@lists.php.net to get a copy of this message | ||
Hi, I have a form with a text area, what I would like to do is What ever
text the user types into the textarea will be entered into a database with
the same formatting they used when typing in the data. For exampe:
Hello
PHP
World
If they type it so that it looks exactly like that, I want it to post that
same way on the webpage when it gets the info from the database. I thought
that if they type that way and the info saves into a blob record it would
save the breaks, but when i go to get the info to display on the webpage its
just one really long line, I tried using <pre> but it was still one line. I
notcided that if I didnt let the text wrap on its own in the textarea it
looked the way I wanted, but to keep it from wrapping you had to enter
before the text started wrap. The area needs to be no more than 150
characters wide, so I was wandering if there is a way to make it insert a
break before the text wraps, so that the user wont have to hit enter
everytime before the text starts to wrap.
Sorry for such the long question, this was kinda hard for me to explain, but
I really appreciate it.