Problem with backslashes!!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eitan
Forum Newbie
Posts: 1
Joined: Thu Dec 11, 2003 3:42 pm

Problem with backslashes!!!

Post 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);

?>
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

How bout just regular stripslashes?
Post Reply