![]() ![]() |
Nov 3 2009, 01:34 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 23 Joined: 6-September 09 From: India Member No.: 33,611 Languages: Javascript,PHP, ASP, HTML |
Please function for this work...
it inputs and removes all the "\" coming before ' or " for eg... input----(\' string...) should return...('string...) |
|
|
|
Nov 3 2009, 01:55 PM
Post
#2
|
|
|
Duotone Fox ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 3,585 Joined: 6-November 07 Member No.: 18,212 Languages: (X)HTML, CSS, Javascript, PHP, SQL, XML [DOM]. |
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. This post has been edited by Ingolme: Nov 3 2009, 01:55 PM |
|
|
|
Nov 3 2009, 06:50 PM
Post
#3
|
|
|
Newbie ![]() Group: Members Posts: 23 Joined: 6-September 09 From: India Member No.: 33,611 Languages: Javascript,PHP, ASP, HTML |
yes these were automatically generated..how to stop this...
and thanks for the function |
|
|
|
Nov 3 2009, 06:57 PM
Post
#4
|
|
|
Living under a rock. ![]() ![]() ![]() Group: Members Posts: 709 Joined: 24-January 06 From: 612 Wharf Avenue Member No.: 2,173 Languages: XHTML, CSS, JavaScript, PHP |
Ingolme just told you how. Use
CODE stripslashes()
|
|
|
|
Nov 3 2009, 07:08 PM
Post
#5
|
|
|
The Old Man From Scene 24 ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 14,826 Joined: 17-April 06 From: Phoenix Member No.: 4,190 Languages: Focusing on PHP and JavaScript |
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-gpc You 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. |
|
|
|
Nov 3 2009, 07:12 PM
Post
#6
|
|
|
Newbie ![]() Group: Members Posts: 23 Joined: 6-September 09 From: India Member No.: 33,611 Languages: Javascript,PHP, ASP, HTML |
thanks magic_quotes_gpc worked....
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd November 2009 - 06:04 AM |