Remove the extra \'s which php is putting into database
Hi, how can i remove the extra \'s which php is putting into my database? Is there a way of removing the slashes from all submited form data before it gets posted?
strip_slashes?
Monkey01: turn magic_quotes_gpc off
ok, how do i do that?
and what is it used for?
strip_slashes($variable); ?
Monkey01: It's a php.ini setting
Monkey01: php.ini or .htaccess or something
there are about 200 vars over 10 forms, is there a global way of removing it? It has to be put into a database so i cannot turn off magicquotes as the db errors :/
run strip slashes against your $_POST
the db errors probably because you aren't defining your variables?
i did not know i could do strip_slashes($_POST) and it will run against all the posted data, thats pretty clever!
thanks for your advice people, i shall investigate my problem