Page 1 of 1

Problem with backslashes!!!

Posted: Thu Dec 11, 2003 3:42 pm
by eitan
I’m sending data from form that contain double quote and I got backslashes before every quote.
The script “stripcslashes” doesn't help.
please help to get rid of backslashes...

<?php
$data = $_POST["data"];

stripcslashes($data);

$file = "newfile.txt";
if (!$file_handle = fopen($file,"wb")) { die("Cannot open file"); }
if (!fwrite($file_handle, $data)) { die("Cannot write to file"); }
fclose($file_handle);

?>

Posted: Thu Dec 11, 2003 3:47 pm
by DuFF
How bout just regular stripslashes?