using mysql_real_escape_string

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bill

    #1

    using mysql_real_escape_string

    being prudent, and listeng to ng members I am now using
    mysql_real_esca pe_string on my user uploaded data.

    I give the user a form to fill in, including some text areas.
    I then save them in a mysql database. When the user returns
    to the form, I fill in the data from mysql.

    The problem is that each time the user returns to the form
    additional \r\n are appended to the entry.

    I tried using stripslashes() on the data before I put it into the
    textarea, with no improvement.

    suggestions please.

    bill
  • BKDotCom

    #2
    Re: using mysql_real_esca pe_string


    bill wrote:
    The problem is that each time the user returns to the form
    additional \r\n are appended to the entry.
    >
    I tried using stripslashes() on the data before I put it into the
    textarea, with no improvement.
    dunno where your linefeeds are comming from, but give trim() a shot.

    Comment

    • bill

      #3
      Re: using mysql_real_esca pe_string

      BKDotCom wrote:
      bill wrote:
      >The problem is that each time the user returns to the form
      >additional \r\n are appended to the entry.
      >>
      >I tried using stripslashes() on the data before I put it into the
      >textarea, with no improvement.
      >
      dunno where your linefeeds are comming from, but give trim() a shot.
      >
      thanks
      found them, I had used a PHP indent on my development system and
      it put two spaces before everything, including the </textareaso
      the prior line's linefeed and those spaces got included in the
      textarea = like it or not.

      Seems stupid, but when I took them out, no further problem.

      bill

      Comment

      Working...