Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
Well, instead of storing the text from the textarea directly into the db, validate it and wrap it with br / tags (replace \n) and then store it. This way you needn't use nl2br every time you retrieve the text from db. -Sterex On Fri, May 15, 2009 at 7:42 PM, Stuart stut...@gmail.com wrote:

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
...@phpscriptor.comwrote: Yes, I thought about that. But then you have a problem when you're going to 'edit' that data back in a form. Then you get first linebr /second line in your textarea. Manoj Sterex wrote: Well, instead of storing the text from the textarea directly into the db, validate

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
and when you are editing the text again, it will be properly formatted. You'll also get toolbars for text editing etc., more like your mail compose window right now. :) -Sterex On Fri, May 15, 2009 at 7:56 PM, Robert Cummings rob...@interjinn.comwrote: On Fri, 2009-05-15 at 19:48 +0530, Manoj

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
TinyMCE: http://tinymce.moxiecode.com/ -Sterex On Fri, May 15, 2009 at 7:56 PM, Paul M Foster pa...@quillandmouse.comwrote: On Fri, May 15, 2009 at 07:03:49AM -0700, PHPScriptor wrote: Hello, How do you guys handle this problem. Just a form with a textarea. When I use enters in

Re: [PHP] textarea new line to mysql database

2009-05-15 Thread Manoj Sterex
@tedd: Its just another way of looking at the things. Putting HTML into the DB is not really wrong (perhaps in this context it is). If you do have HTML in the DB, you can directly echo it out and use CSS to style it accordingly. Just my 2 cents. :) -Sterex On Fri, May 15, 2009 at 8:24 PM, tedd