Link to home
Start Free TrialLog in
Avatar of kadin
kadinFlag for United States of America

asked on

form, textarea. how to wrap text (address) for input into database?

My form textarea has wrap="hard". I input into database and then retrieve and echo it page. It dose not wrap. I changed table field type from varchar to text, but still it echo's back as one long string. This is a postal address. How do I go about doing this? Thanks.

Instead of using textarea, should the input be 3 or 4 fields.? Name, street, city, state, zip etc.
Avatar of Gary
Gary
Flag of Ireland image

Are you doing anything with the content before you put it in the db or before you put it back in the textarea?
Avatar of kadin

ASKER

no.
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kadin

ASKER

Thanks so much. That worked.
Avatar of kadin

ASKER

When you say.
It also helps with normalizing your database and not having unnecessary large fields.
Do you mean it is better to break up the address name, street, city etc. to store into database?

I will be copying the postal address from an email and inputting it myself into a form to store in database. Then print it to a webpage.
Whichever works the best and easiest for you.  If all you are doing is storing the address with no intention of doing anything else with the data then keep on storing it in one field.
Avatar of kadin

ASKER

Thanks again.