papaface Posted February 5, 2007 Share Posted February 5, 2007 Hello, How can I email something submitted in a text area using PHP (i know how to send a stanard email) keeping the new lines that were made in the textarea. Currently when i send an email it just sends it all on one line. Thanks Link to comment https://forums.phpfreaks.com/topic/37212-solved-emailing-with-text-areas/ Share on other sites More sharing options...
troy_mccormick Posted February 5, 2007 Share Posted February 5, 2007 Hey dev, When sending text from a textarea, wrap the variable in a nl2br(). For example: <?php $comments = nl2br($_POST["comments"]); ?> I hope this answers your question! Link to comment https://forums.phpfreaks.com/topic/37212-solved-emailing-with-text-areas/#findComment-177763 Share on other sites More sharing options...
papaface Posted February 5, 2007 Author Share Posted February 5, 2007 Thanks, worked great. Link to comment https://forums.phpfreaks.com/topic/37212-solved-emailing-with-text-areas/#findComment-177789 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.