...

View Full Version : formating question



Jacobb123
05-12-2008, 09:51 PM
I have a form text area that looks like this:


<textarea rows="5" name="check_desc" cols="50" style="border:1px solid #666666; WIDTH: 100%; padding-left:4; padding-right:4; padding-top:1; padding-bottom:1">
Name:
Address:
City:
State:
Zip Code:
Country:

</textarea>

When I post the data it comes out looking like this:


Name: Address: City: State: Zip Code: Country:

How do I format it so that it come out like this:

Name:
Address:
City:
State:
Zip Code:
Country:

peteyb383
05-12-2008, 10:00 PM
$check_desc = nl2br($_POST["check_desc"]);

echo $check_desc;

That's assuming that your form method is POST. This should work to hold the line breaks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum