#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    Redmond, WA
    Posts
    218
    Rep Power
    15
    This question is also in correspondence to what I recently posted a few minutes ago.

    When I enter "Don't worry" in the textarea input box, the string, "Don't worry" is passed to the PHP variable. Why does this happen and how do I prevent this from happening..

    Again, thanks in advance,

    Chris
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    It passes a backslash () because PHP thinks of the quote as a literal character instead of being a part of the string. To overcome this, use stripslashes() (it might be strip_slashes(), I'm not sure and I'm too lazy to check the manual.)

    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    63
    Rep Power
    15
    look at the php.ini file.... and search for magic quotes. Magic quotes add slashes to fields with ' and I think " but I'm not sure.

    UJL

Similar Threads

  1. help with tables and wordwrapping
    By junkedBrian613 in forum PHP Development
    Replies: 2
    Last Post: February 15th, 2004, 06:42 PM
  2. How to read multiple line text file into a variable
    By gatewaycityca in forum Visual Basic Programming
    Replies: 4
    Last Post: January 29th, 2004, 01:26 PM
  3. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 07:19 PM
  4. carriage returns on form text box, help please
    By Favian in forum Perl Programming
    Replies: 6
    Last Post: January 18th, 2004, 07:55 PM
  5. float question
    By yeah-yeah in forum HTML Programming
    Replies: 10
    Last Post: January 15th, 2004, 04:59 PM

IMN logo majestic logo threadwatch logo seochat tools logo