I am trying to make a function so that i can change the " ' and \ into \" \' and \ for easy introduction into a sql database, but the following does not work when i think it should, can anyone offer any suggestions?
<?
function striptags($string){
$string = str_replace("\"", "\\"", $string);
$string = str_replace("'", "\'", $string);
$string = str_replace("\", "\\", $string);
}
striptags($input);
echo $input;
?>