Jump to content

nl2br Help


DanyalSakrani

Recommended Posts

OK so that works. There must be something in your code which escapes the newlines characters. Not sure what's up but I will have a look.

 

@ redarrow

like i said was your action='' and char-set

No that was my code DanyalSakrani said worked.

 

Yeah. I added the action, and removed the char-set. It didn't work. And thanks :D

Link to comment
Share on other sites

I have solved it. As he/she has yet to be able to find out why his script is not converting the newlines.

 

I ahve just simply did a bit of basic debugging to see if its the server that is at fault. But as my code is running as it should then I have assumed it must be something is his/her script that is not quite right.

 

ALso by the way this post:

accept-charset='iso-8859-1 <<<<<<<<<<, this is why

try without it ok.

No offence but makes no sense at all! At least provide an example and explain where its supposed to go. Rather than just posting a snippet and saying use that.

Link to comment
Share on other sites

I have solved it. As he/she has yet to be able to find out why his script is not converting the newlines.

 

I ahve just simply did a bit of basic debugging to see if its the server that is at fault. But as my code is running as it should then I have assumed it must be something is his/her script that is not quite right.

 

ALso by the way this post:

accept-charset='iso-8859-1 <<<<<<<<<<, this is why

try without it ok.

No offence but makes no sense at all! At least provide an example and explain where its supposed to go. Rather than just posting a snippet and saying use that.

 

Hey, you know how to fix it? :o. Can you post the solution? Thanks!

Link to comment
Share on other sites

I thought that nl2br only worked when echoing data, not when inserting it in to a database...

 

I have always just had the user fill out a text box where they hit enter for a new line. Then insert it in to a TEXT field in my table. Then when I display it I use nl2br.

 

I have never had any problems with that.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.