Formating input from multi-line text field

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Formating input from multi-line text field

Post by JayBird »

i have a multi-line text field in a form for people to enter their address detials.

When someone enter:

Some street
Some place
Some where

when the form is submitted and i print the address to the broswer, it is display all on one line. How can i keep the line breaks?

Cheerz

Mark
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

after the form has been submitted

Code: Select all

$address = nl2br($_POST[address]);
Last edited by qads on Fri Aug 29, 2003 8:21 am, edited 1 time in total.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

cheerz buddy

Mark
Post Reply