#1
  1. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    I believe that you want to escape certain characters in a query, like quotes, backslash, semi-colon, etc. Is there a function in PHP to do all this for you and make the string safe to use as a query string?

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

    Join Date
    Jun 2000
    Posts
    43
    Rep Power
    15
    I use:

    $string = addslashes($string);

    This escapes most query string problems.
    I believe ' " and itself.
    I haven't had any problems.

    ------------------
    lhallusa
    webpatron.com

Similar Threads

  1. C# user input
    By netytan in forum .Net Development
    Replies: 4
    Last Post: April 2nd, 2008, 11:09 AM
  2. PHP User restrictions
    By Mastah in forum PHP Development
    Replies: 2
    Last Post: February 9th, 2004, 03:41 AM

IMN logo majestic logo threadwatch logo seochat tools logo