Decipher Posted June 19, 2007 Share Posted June 19, 2007 Hi, I am using $query=$_GET["query"]; to retrieve query string but if i pass say "test" in the query the output of $query variable is -> \"test\" i.e. it is putting an extra backslash before the double quotes.. any suggestion??? Quote Link to comment https://forums.phpfreaks.com/topic/56235-_get-putting-unwanted-chars/ Share on other sites More sharing options...
akitchin Posted June 19, 2007 Share Posted June 19, 2007 you can use stripslashes() on the GET data if you want. this is caused by magic quotes - see the manual for details. Quote Link to comment https://forums.phpfreaks.com/topic/56235-_get-putting-unwanted-chars/#findComment-277733 Share on other sites More sharing options...
ryeman98 Posted June 19, 2007 Share Posted June 19, 2007 I'm not sure if it'll matter but... Change: $query=$_GET["query"]; To: $query=$_GET['query']; Quote Link to comment https://forums.phpfreaks.com/topic/56235-_get-putting-unwanted-chars/#findComment-277855 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.