NathanLedet Posted August 11, 2008 Share Posted August 11, 2008 Having a little issue with my contact form, where the text field that gets filled out gets all of the extra space stripped out. My code uses htmlentities and strip slashes: $message = htmlentities(stripslashes($_POST['message'])); and a message that has paragraph breaks does not keep the extra space. How can I keep the hard returns? Thanks, -Nate Link to comment https://forums.phpfreaks.com/topic/119175-solved-contact-form-keeping-structure/ Share on other sites More sharing options...
discomatt Posted August 11, 2008 Share Posted August 11, 2008 nl2br() $message = nl2br( htmlentities(stripslashes($_POST['message'])) ); Link to comment https://forums.phpfreaks.com/topic/119175-solved-contact-form-keeping-structure/#findComment-613736 Share on other sites More sharing options...
NathanLedet Posted August 11, 2008 Author Share Posted August 11, 2008 Indeed that was it! thank you Link to comment https://forums.phpfreaks.com/topic/119175-solved-contact-form-keeping-structure/#findComment-613746 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.