#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    4
    Rep Power
    0
    How's it going?

    Does anyone please know why when trying to clear up user input that has been entered into a form, php only clears up most of it and not all?

    For example, using stripslashes to remove all slashes from a variable after a user has submitted quotation marks ("") into a form.

    The quotation marks cause the variable being parsed to contain slashes.

    e.g. a user enters """""" into a form , the variable returned to php becomes """""

    So if I only wanted the quotation marks, I thought the stripslashes function would achieve this.
    However, it only removes 3 of the 5 slashes leaving 2 unwanted slashes behind.

    Any ideas why this is please gentlemen and women?

    Thanks very much if you could help me solve this.

    Regards,

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

    Join Date
    Jun 2000
    Location
    Seaside, CA
    Posts
    84
    Rep Power
    14
    Could have something to do with "magic quotes." Take a look at the PHP annotated manual (www.php.net) and see if that's the problem.

Similar Threads

  1. Email form in PHP was told having problems on a MAC?
    By solcjoye in forum HTML Programming
    Replies: 0
    Last Post: February 12th, 2004, 02:32 PM
  2. auto populating form
    By usrbin in forum PHP Development
    Replies: 1
    Last Post: February 11th, 2004, 01:10 PM
  3. auto populating form
    By usrbin in forum PHP Development
    Replies: 4
    Last Post: February 11th, 2004, 11:52 AM
  4. uploading from php form / generating mysql value
    By emp/ir:kal in forum PHP Development
    Replies: 2
    Last Post: February 9th, 2004, 09:30 PM
  5. empty form when user clicks back
    By mystang46 in forum ASP Programming
    Replies: 0
    Last Post: February 3rd, 2004, 04:23 PM

IMN logo majestic logo threadwatch logo seochat tools logo