PDA

View Full Version : What data type do I need to use to . . .


WTSO
05-02-2003, 05:06 PM
Store text that includes some line breaks . . .

Here's what I'm trying to do: I want to allow some of my clients to type in a biography about themselves into an input box. That will include a few paragraphs and all. Then, I want to save the form to MySQL.

How do I setup the input box to allow for line breaks (RETURNS)? What data type do I need to store this entry in?

ecnarongi
05-02-2003, 10:19 PM
How will the biographies be displayed? If on the web you could have a server side script replace all instances of ascii chr13 (the reutrn character) with "<br>"s. I don't think the return character throughs errors in a database.

If you are looking at the information that your clients typed in and see a "\n" that is the return character. Not sure what you need, tell me a little more :)

WTSO
05-03-2003, 02:57 AM
Hehehe . . . I got 'er up and going. It wasn't in my db but in my input box. I changed the configuration of the form, and I'm in GOOD shape!

Thanks for the quick response, though! I may hit you guys up later!

ErikvD
05-08-2003, 12:10 AM
How did you solve it?

I've got the same problem, but I can't find anything that helps.
What did you change in the form?

WTSO
05-08-2003, 02:26 AM
Use a scrolling text box for input. That did the trick.

Let me know how it turns out, okay?

ErikvD
05-08-2003, 04:20 AM
I allready used that, but I've allready been able to find the solution: I didn't use 'nl2br', now I have and it works great!

Still... thanks for your help. ;-)