Problem in textarea - displays \n in textarea

Discussion in 'PHP' started by harshil, Oct 9, 2008.

  1. #1
    HI,

    I have a textarea for user to enter a msg but after entering the msg when user enters the submit button. the textarea shows the content with \r\n.

    I don't why \r\n r displayed with the message !!

    Ex:

    Hi
    how r u?

    --> Hi\r\nhow r u?

    This is the way it looks like !!

    Anybody can help me ??
     
    harshil, Oct 9, 2008 IP
  2. mehdi

    mehdi Peon

    Messages:
    258
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Please post the code you are using, we will look at it.
     
    mehdi, Oct 9, 2008 IP
  3. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #3
    user probabbli press enter after last line, and for textarea it return new line. you can trim the textarea.
     
    javaongsan, Oct 10, 2008 IP