Piyush Posted November 3, 2009 Report Share Posted November 3, 2009 Please function for this work...it inputs and removes all the "\" coming before ' or "for eg...input----(\' string...)should return...('string...) Link to comment Share on other sites More sharing options...
Ingolme Posted November 3, 2009 Report Share Posted November 3, 2009 (edited) Are these slashes appearing automatically in your strings? It sounds like you have a server with magic quotes activated.The stripslashes() function removes slashes from special characters. Edited November 3, 2009 by Ingolme Link to comment Share on other sites More sharing options...
Piyush Posted November 3, 2009 Author Report Share Posted November 3, 2009 yes these were automatically generated..how to stop this...and thanks for the function Link to comment Share on other sites More sharing options...
Err Posted November 3, 2009 Report Share Posted November 3, 2009 Ingolme just told you how. Use stripslashes() Link to comment Share on other sites More sharing options...
justsomeguy Posted November 3, 2009 Report Share Posted November 3, 2009 If you want to stop it from happening in the first place then set the magic_quotes_gpc PHP option to off.http://www.php.net/manual/en/info.configur...agic-quotes-gpcYou can only set that option inside an htaccess file or php.ini file, using ini_set at runtime on that option doesn't do anything. Link to comment Share on other sites More sharing options...
Piyush Posted November 3, 2009 Author Report Share Posted November 3, 2009 thanks magic_quotes_gpc worked.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now