pass line breaks in text area input
I have a textarea input on a fo开发者_开发百科rm for users to submit their snail mail address.
This is the code I have<textarea name="Mail" rows="4" ></textarea>
I would like for the line breaks in the text area to be passed in the POST data so that the address will appear properly in the code echo $_POST['Mail'];
Use this:
print nl2br($_POST['Mail']);
精彩评论