Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

Restore data entered in "textarea" as it is

General discussions related to php

Moderators: macek, egami, gesf

Restore data entered in "textarea" as it is

Postby vikaspa » Sun Aug 25, 2002 7:45 am

Dear All,

It was amazing to have superb help from all of you !!

I have typical problem..

An Employee's address is entered in "textarea", multiline text box and want to display it (onn retrieval) the way user has entered !!

The user types a sentence / line of address and then press "ENTER" key.
The data seen on the screen (to the user who is entering text) is in separate lines delimited by <crlf> or enter key.

When I store this data into field type "varchar" , I get single string and I am unable to display the data the way user has entered...

Please guide me as how do I store this data and how the same can be displayed in the same manner as entered by user.

I am open to any changes, usage of javascript etc.

Exaple :
User Enters data as follow

Vikas Athavale
111111, 2
33333, 444444
55555
66666

When I display it the same is displayed as
111111, 2 33333, 444444 55555 66666

Please help !!

with regards
Vikas Athavale
vikaspa
New php-forum User
New php-forum User
 
Posts: 21
Joined: Wed Jun 19, 2002 10:03 pm

Postby Jay » Sun Aug 25, 2002 3:39 pm

To make a new line in a text area you have to use the html entity for a new line character which is &#10;, not <br> because they don't work in text areas!!!
Jay
 


Return to PHP General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.