Page 1 of 1
php adding forward slashes to $_get
Posted: Tue Mar 15, 2011 4:21 pm
by Ralphy
Hello, Im using $_get to retrieve some info and it seems to be adding a forward slash to the end of my strings. I turned off magic quotes and stripslashes doesn't seem to work for me.
Anyone got any ideas?
Thank you.
Re: php adding forward slashes to $_get
Posted: Tue Mar 15, 2011 4:45 pm
by John Cartwright
Did you restart apache after disabling magic quotes?
Re: php adding forward slashes to $_get
Posted: Wed Mar 16, 2011 12:25 pm
by pickle
Whenever I load data out of $_POST or $_GET, I always check if magic quotes are on and act accordingly:
Code: Select all
$username = (get_magic_quotes_gpc()) ? stripslashes($_GET['username']) : $_GET['username'];