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 Quote 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'])) ); Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.