Textarea to MySQL with linebreaks
Moderator: General Moderators
Textarea to MySQL with linebreaks
How can I get teaxareas text to MySQL DB with linebreaks,
im building an news add form, but the line breaks wont work.
Should I write pure html to the box or what?
im building an news add form, but the line breaks wont work.
Should I write pure html to the box or what?
- darodesign
- Forum Newbie
- Posts: 19
- Joined: Mon Aug 28, 2006 8:58 am
- Location: Berlin
- Contact:
Please next time do a better question!
I think you need is nl2br, which converts Unix breaks \n to HTML breaks <br />.
I hope this is what you needed.
I think you need is nl2br, which converts Unix breaks \n to HTML breaks <br />.
I hope this is what you needed.
- darodesign
- Forum Newbie
- Posts: 19
- Joined: Mon Aug 28, 2006 8:58 am
- Location: Berlin
- Contact:
-
blackbeard
- Forum Contributor
- Posts: 123
- Joined: Thu Aug 03, 2006 6:20 pm
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- darodesign
- Forum Newbie
- Posts: 19
- Joined: Mon Aug 28, 2006 8:58 am
- Location: Berlin
- Contact:
If I understand your question right, you meen JavaScript, like here in this Board if you click the URL Buttons it inserts Code to the Textbox.
Else maybe you ment this Functions:
http://php.net/htmlspecialchars
http://php.net/htmlentity
Else maybe you ment this Functions:
http://php.net/htmlspecialchars
http://php.net/htmlentity