开发者

pass line breaks in text area input

开发者 https://www.devze.com 2022-12-20 07:18 出处:网络
I have a textarea input on a fo开发者_开发百科rm for users to submit their snail mail address.

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

精彩评论

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