1) alright, to figure out how to write and read to/from a text file, check out fopen , fread and fwrite
2) Slashes are added to quotes when you pass the data from one page to another. To remove it you have to user stripslashes()
$string= stripslashes($string);
actually, stripslashes doesn't get rid of the double quotes but this should remove both of them.
$string = preg_replace("/['\"]/", "", $string);