开发者

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']);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜