I created a way to post news on a site I'm making but when a user hits enter in the textarea no line break is created. I can type <br>, but thats not very user friendly. How do I make it so when A user hits enter it is interpreted as a line break?
When you process the form, send the text the user has typed through the php function nl2br(). Then at every new line in the textarea, php will put in a <br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.