Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    example for requirment of addslash

    hello all,

    i start to do some work with php, two questions first i'm using php-dev, do you recommend any other editor?

    second i'm confused with magic_quotes, in my ini file setting is :
    local value master value
    magic_quotes_gpc On On
    magic_quotes_runtime Off Off
    magic_quotes_sybase Off Off

    and i dont use any addslash or strip slash in my code but when i put a sentence like "this's is " a /test" in my form to push it in mysql field, it saved exactly same and i can retrieve it same either, so why do people use addslash and strip salsh? would you give me some examples to test?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,864
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Take a look at GPC Stripping Tutorial
    After stripping the slashes added by magic_quote settings, you'd need to clean all external data(from GPC) of type string using mysql_real_escape_string()
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •